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

AMD64 build doesn't pass -fPIC when building library modules #9

Open
egelmex opened this issue Apr 24, 2013 · 3 comments
Open

AMD64 build doesn't pass -fPIC when building library modules #9

egelmex opened this issue Apr 24, 2013 · 3 comments
Labels

Comments

@egelmex
Copy link
Contributor

egelmex commented Apr 24, 2013

/usr/bin/ld: cfile.o: relocation R_X86_64_PC32 against undefined symbol `select@@GLIBC_2.2.5' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Bad value
collect2: error: ld returned 1 exit status
occbuild: Command failed: gcc -L/home/me92/src/kroc-git/kroc-git/modules/inmoslibs/libsrc/forall -L/home/me92/src/kroc-git/kroc-git/tvm/posix -shared -o liboccam_tvm_file.so cfile.o
@atsampson
Copy link
Contributor

Objects that are going to be included in a shared library on AMD64 have to be built with -fPIC. occbuild could probably take care of this by returning -fPIC in --cflags on AMD64.

@jadudm
Copy link
Member

jadudm commented Apr 25, 2013

Because I'm trying to learn things, I'll take a stab at this:

Where do I look to make this change? occbuild.in, or m4/occbuild, or somewhere else?

@egelmex
Copy link
Contributor Author

egelmex commented May 7, 2013

I had a look at this a couple of weeks ago but forgot to reply.
I think all you need to edit is occbuild.in

There is a variable target_cpu which the build system injects which can be used for the test to see if we are on x86_64.
So I think it's just a case of finding there the gcc flags are inserted and adding the check there... Someone please correct me if I am wrong about this.

Thats's as far as a I got.

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

No branches or pull requests

3 participants