Page 1 of 1

Build problems on Ubuntu Gutsy amd64

Posted: Sat Feb 09, 2008 9:37 pm
by ChrisC
eranif,

Following on from the posts on sourceforge I am still experiences the 2 same errors 1 of which I can fix as explained.

POST1:
Building codelite on AMD64 Ubuntu Gutsy and have a build error I cannot easily resolve.

Code: Select all

app.cpp:(.text+0x362d): undefined reference to `SvnRevision' 
Is there an obvious fix or shall I keep searching...

POST2:
OK I solved this problem.

When you call make the object list is generated from the cpp files in LiteEditor. However the svninfo.cpp file does not yet exist as it is created during the build process. this can be fixed by calling 'make pre_build' before make. A better solution would be to include an empty svninfo.cpp file.

Next problem....

Code: Select all

g++ -O3 -DREGEXP_UNICODE -shared -o ../lib/Debugger.so Release_gcc_unicode/dbgcmd.o Release_gcc_unicode/debuggergdb.o Release_gcc_unicode/gdbinfolexer.o Release_gcc_unicode/gdb_lexer.o -pthread -lwx_gtk2u_richtext-2.8 -lwx_gtk2u_aui-2.8 -lwx_gtk2u_xrc-2.8 -lwx_gtk2u_qa-2.8 -lwx_gtk2u_html-2.8 -lwx_gtk2u_adv-2.8 -lwx_gtk2u_core-2.8 -lwx_baseu_xml-2.8 -lwx_baseu_net-2.8 -lwx_baseu-2.8 -L../lib -lpluginu -lcodeliteu 
/usr/bin/ld: Release_gcc_unicode/dbgcmd.o: relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC 
Release_gcc_unicode/dbgcmd.o: could not read symbols: Bad value 
collect2: ld returned 1 exit status 
make[1]: *** [Plugin] Error 1 
make[1]: Leaving directory `/home/fffd/projects/codelite/Debugger' 
make: *** [Debugger] Error 2 
 
any clues.....?

Re: Build problems on Ubuntu Gutsy amd64

Posted: Sat Feb 09, 2008 11:20 pm
by eranif
Hi,

Did u update the svn? I fixed the makefiles to include '-fPIC' flag during the shared object creation, this should fix it for you.

If the problem persists,
try adding the -fPIC flag to the compilation as well, by this I mean, change the compiler to include the fPIC as well:

change line 53 from (in file trunk/Debugger/makefile):

Code: Select all

CMP=g++ $(DEBUG) $(OPT) 
to

Code: Select all

CMP=g++ -fPIC $(DEBUG) $(OPT) 
Clean the debugger project only:

Code: Select all

cd trunk/Debugger/
make type=release_unicode clean
make type=release_unicode
Post here the results you got.

Eran

Re: Build problems on Ubuntu Gutsy amd64

Posted: Sun Feb 10, 2008 6:05 am
by ChrisC
I did as you suggested but then it tripped over with a similar error with other parts as well.

Plugins
wxsqlite3
sqlite3
CodeLite
SubVersion
ReferenceAnalyser

I managed to fix some of them via similar means but gave up in the end. I may try again tomorrow.

Re: Build problems on Ubuntu Gutsy amd64

Posted: Sun Feb 10, 2008 11:15 am
by eranif
Ok, I will patch the makefiles today for all other components - i will see that they dont break build on 386 machines, and probably I will commit it

EDIT: I updated all makefiles for all components, you should do '

Code: Select all

svn update
' followed by

Code: Select all

make clean && make
Eran

Re: Build problems on Ubuntu Gutsy amd64

Posted: Sun Feb 10, 2008 5:39 pm
by ChrisC
Thanks for your patience.....

Unfortunately I am still getting an error. On first build it errors with the SvnRevision error. building the second time errors with another fPIC error

Code: Select all

g++ -fPIC  -O3 -DREGEXP_UNICODE  -shared   -o ../lib/ReferenceAnalyser.so Release_gcc_unicode/analyseroptionsbasedlg.o Release_gcc_unicode/analyseroptions.o Release_gcc_unicode/referenceanalyser.o Release_gcc_unicode/referenceanalyseroptionsdlg.o -pthread   -lwx_gtk2u_richtext-2.8 -lwx_gtk2u_aui-2.8 -lwx_gtk2u_xrc-2.8 -lwx_gtk2u_qa-2.8 -lwx_gtk2u_html-2.8 -lwx_gtk2u_adv-2.8 -lwx_gtk2u_core-2.8 -lwx_baseu_xml-2.8 -lwx_baseu_net-2.8 -lwx_baseu-2.8  -L../lib -lpluginu -lcodeliteu -L../sdk/wxflatnotebook/lib -lwxflatnotebooku -lwxsqlite3u
/usr/bin/ld: ../lib/libwxsqlite3u.a(sqlite3.o): relocation R_X86_64_32S against `sqlite3UpperToLower' can not be used when making a shared object; recompile with -fPIC
../lib/libwxsqlite3u.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make[1]: *** [ReferenceAnalyser] Error 1
make[1]: Leaving directory `/home/fffd/projects/codelite/ReferenceAnalyser'
make: *** [ReferenceAnalyser] Error 2
Chris

Re: Build problems on Ubuntu Gutsy amd64

Posted: Sun Feb 10, 2008 6:58 pm
by eranif
I finally got an access to a 64 bit machine (amd64, Debian), I will have a look at it now, and will let you know how it goes.
Eran

Re: Build problems on Ubuntu Gutsy amd64

Posted: Sun Feb 10, 2008 7:55 pm
by eranif
Ok, fixed that - you should now be able to built it on 64bit machine (I managed to reproduce the exact same error on my 64 bit machine).
I am sorry for any inconvenience, but you will need to do a clean before building.

that is:

Code: Select all

make clean
make
Eran

Re: Build problems on Ubuntu Gutsy amd64

Posted: Sun Feb 10, 2008 11:37 pm
by ChrisC
Thank-you for your persistance.

I have it working and I must say so far I like the feel of it.

Chris