Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

configure --enable-pie fails #1609

Closed
michaelrsweet opened this issue Apr 26, 2006 · 3 comments
Closed

configure --enable-pie fails #1609

michaelrsweet opened this issue Apr 26, 2006 · 3 comments
Milestone

Comments

@michaelrsweet
Copy link
Collaborator

Version: 1.2rc3
CUPS.org User: kssingvo.suse

./configure [...] --enable-pie [...]

results in this site-effect errors in config.log [AMD64]:

configure:9146: checking for jpeg_destroy_decompress in -ljpeg
configure:9176: gcc -o conftest -O2 -fmessage-length=0 -Wall -D_FORTIFY_SOURCE=2 -fno-strict-aliasing -fstack-protector -Wl,-rpath,/usr/lib64 -pie conftest.c -ljpeg -lcrypt >&5
/usr/lib64/gcc/x86_64-suse-linux/4.1.0/../../../../x86_64-suse-linux/bin/ld: /tm
p/ccQmbv7G.o: relocation R_X86_64_32 against a local symbol' can not be used when making a shared object; recompile with -fPIC /tmp/ccQmbv7G.o: could not read symbols: Bad value collect2: ld returned 1 exit status [...] configure:9208: result: no [...] configure:9365: checking for gzgets in -lz configure:9395: gcc -o conftest -O2 -fmessage-length=0 -Wall -D_FORTIFY_SOURCE=2 -fno-strict-aliasing -fstack-protector -Wl,-rpath,/usr/lib64 -pie conftest.c -lz -lcrypt >&5 /usr/lib64/gcc/x86_64-suse-linux/4.1.0/../../../../x86_64-suse-linux/bin/ld: /tmp/ccqRIYvY.o: relocation R_X86_64_32 againsta local symbol' can not be used when making a shared object; recompile with -fPIC
/tmp/ccqRIYvY.o: could not read symbols: Bad value
collect2: ld returned 1 exit status
[...]
configure:9427: result: no

[... and many more ...]

I think it's mandatory to compile with '-fPic', if compiling with '-pie' on amd64 processors. Please add it to the configure options.

@michaelrsweet
Copy link
Collaborator Author

CUPS.org User: mike

If you look at the OPTIM definition, you'll find both -fpie and -fPIC.

The issue appears to be that the DSO flags don't include -pie, however that brings up an issue of the pthreads library which apparently needs to be explicitly listed with -pie, but not normally...

I'll see what I can do to get things to compile with --enable-pie, but it isn't something we normally build or test with...

@michaelrsweet
Copy link
Collaborator Author

CUPS.org User: mike

OK, I just committed a fix for this in r5466. Please let me know if that doesn't fix things for you...

@michaelrsweet
Copy link
Collaborator Author

CUPS.org User: kssingvo.suse

Yes, it fixes the problem.
You might want to close this STR. :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant