[cups-devel] [MOD] STR #4381: cups-1.7.1 fails to (cross) compile on MIPS architecture

msweet at apple.com msweet at apple.com
Thu Mar 6 02:27:10 PST 2014


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

DO NOT REPLY TO THIS MESSAGE.  INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.

[STR Resolved]

Hello Michael,

I have used --with-optim="-fPIC", but the problem is that -fPIC is only
passed to LDFLAGS, not to CFLAGS, so I still having the same failure.
Please, take a look to this:

./configure --target=mips64-buildroot-linux-uclibc
- --host=mips64-buildroot-linux-uclibc --build=x86_64-unknown-linux-gnu
- --prefix=/usr --exec-prefix=/usr --sysconfdir=/etc --program-prefix=""
- --disable-gtk-doc --disable-doc --disable-docs --disable-documentation
- --with-xmlto=no --with-fop=no   --enable-ipv6 --enable-static
- --disable-shared  --without-perl --without-java --without-php
- --disable-gnutls --disable-gssapi --with-optim=-fPIC --libdir=/usr/lib
- --disable-dbus --without-python --disable-pdftops

As you can see, the -fPIC option is present. Now, take a look to this:

make[1]: Entering directory
`/home/ldap/vriera/work/mips-buildroots/mips32_be_sf/output/build/cups-1.7.1'
Using ARCHFLAGS=
Using ALL_CFLAGS=-I.. -D_CUPS_SOURCE -D_LARGEFILE_SOURCE
- -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
- -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -pipe -Os  
- -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_THREAD_SAFE -D_REENTRANT 
Using ALL_CXXFLAGS=-I.. -D_CUPS_SOURCE -D_LARGEFILE_SOURCE
- -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
- -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -pipe -Os  
- -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_THREAD_SAFE -D_REENTRANT 
Using
CC=/home/ldap/vriera/work/mips-buildroots/mips32_be_sf/output/host/usr/bin/mips64-buildroot-linux-uclibc-gcc
Using
CXX=/home/ldap/vriera/work/mips-buildroots/mips32_be_sf/output/host/usr/bin/mips64-buildroot-linux-uclibc-gcc
Using DSOFLAGS=-L../cups 
Using LDFLAGS=-L../cgi-bin -L../cups -L../filter -L../ppdc -L../scheduler
- --static  -fPIE -pie -fPIC  -D_GNU_SOURCE
Using LIBS=../cups/libcups.a    -lz -lpthread -lm -lcrypt   -lz
Making all in cups...

As you can see, the -fPIC option is only present on LDFLAGS, not in
ALL_CFLAGS, so I still having the same failure:

Making all in test...
make[2]: Entering directory
`/home/ldap/vriera/work/mips-buildroots/mips32_be_sf/output/build/cups-1.7.1/test'
Compiling ippserver.c...
Compiling ipptool.c...
Linking ippserver...
/home/ldap/vriera/work/mips-buildroots/mips32_be_sf/output/host/usr/lib/gcc/mips64-buildroot-linux-uclibc/4.7.3/../../../../mips64-buildroot-linux-uclibc/bin/ld:
/home/ldap/vriera/work/mips-buildroots/mips32_be_sf/output/host/usr/lib/gcc/mips64-buildroot-linux-uclibc/4.7.3/crtbeginT.o:
relocation R_MIPS_HI16 against `a local symbol' can not be used when making
a shared object; recompile with -fPIC
/home/ldap/vriera/work/mips-buildroots/mips32_be_sf/output/host/usr/lib/gcc/mips64-buildroot-linux-uclibc/4.7.3/crtbeginT.o:
could not read symbols: Bad value
collect2: error: ld returned 1 exit status
make[2]: *** [ippserver] Error 1

Link: https://www.cups.org/str.php?L4381
Version: 1.7.1
Fix Version: Third-party
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (GNU/Linux)
Comment: GPGTools - https://gpgtools.org

iQIcBAEBCgAGBQJTGE1+AAoJENujp6sI12IjKUMP/1YHycCe3XZoOHBtHBNpB4uo
neBPYFWjGKwapGq7GmZwRJB/FJpAz+n7WRCoXqwVhqwensTNE1UpoPePdwwn/DYD
Vqyp2S+cMoWdmeZDTpkEKC+EG72+eBOTCAZ6oyLIuPafjIAxM5sAnBSkegZjBeQr
ovlZ8OgoeHgbxcfypF5L15iz1KciSOPFgaAmLJHqHZ1WfYdzqipXF9XtQeHQQAPA
ff86gEhkbxW04afou0Z7jMbXFNqeaJGCJLnFIpB6w0L+m4q8lt07AulMtuftkOjc
Esf+WSGVX/S6ZTyGGmiwD7a6OPZ/WeMwd9B+K2Q760vSiDIBsyVO9Pzix7BxABD2
TccXv8KrZ+o5GB+6yic1IxRpxS+fjbo24tuYfX/w//gUYx33SHWCt4Mjjpq9Ntxr
v3NQDQBZh3CAAohz9cBjnsHdmPdGy42qugLzAu+GMh7EqFbUpiitIi+EFMOUuji6
4LfyswlCjcSkjgeCz5a+1OBudfD4UJwToOBzk7i0BbdLdwv3h8t3jOnJbRh/BSwo
b6NenCPsV00ACuC9J4v+KzGAoYM122a5IAE+HrCbjyVlYAGmGS2k4ps080XK7N1x
izmNLJh6VzNt4l1MYyLERHkQ74M3FHzp+reBwlc2XtfItjdxbR0fabSDKYN3Mvhu
kInOpbW5QY4pOtmB5MWQ
=4cwe
-----END PGP SIGNATURE-----




More information about the cups mailing list