bclzvs / serf

Automatically exported from code.google.com/p/serf
0 stars 0 forks source link

[1.2.x] [PATCH] CFLAGS not being used in linking #124

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
In compiling a 64-bit build of Serf 1.2.1 on Solaris 10 on AMD64, this happens:

/tmp/subversion-apr-build/_install/build-1/libtool --silent --tag=CC 
--mode=link cc -L/nfs/freeport/arch/sunos_x86_64/lib 
-R/nfs/freeport/arch/sunos_x86_64/lib  -static -o test/serf_get libserf-1.la 
test/serf_get.lo -lm    
/tmp/subversion-apr-util-build/_install/lib/libaprutil-1.la     -lexpat 
-L/nfs/freeport/arch/sunos_x86_64/lib  -lssl -lcrypto             
/tmp/subversion-apr-build/_install/lib/libapr-1.la -luuid -lsendfile -lrt 
-lsocket -lnsl -lpthread -lm -lz -lssl -lcrypto
ld: fatal: file test/serf_get.o: wrong ELF class: ELFCLASS64
ld: fatal: File processing errors. No output written to test/serf_get
gmake: *** [test/serf_get] Error 1

This occurs because the link is missing some all-important flags in CFLAGS 
which specify 64-bit mode. Whenever the linker is invoked, it must be passed 
not just LDFLAGS, but also CFLAGS.

The attached patch against SVN branch "1.2.x" fixes this issue.

Original issue reported on code.google.com by isk...@gmail.com on 15 Aug 2013 at 6:10

Attachments: