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

Compile error using gcc version 4.8.5 (Ubuntu 4.8.5-4ubuntu2) #1133

Closed
chasinglulu opened this issue Aug 31, 2018 · 9 comments
Closed

Compile error using gcc version 4.8.5 (Ubuntu 4.8.5-4ubuntu2) #1133

chasinglulu opened this issue Aug 31, 2018 · 9 comments

Comments

@chasinglulu
Copy link

gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.8/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.8.5-4ubuntu2' --with-bugurl=file:///usr/share/doc/gcc-4.8/README.Bugs --enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.8 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.8 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --disable-libmudflap --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.8-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.8-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.8-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.8.5 (Ubuntu 4.8.5-4ubuntu2)

@chasinglulu chasinglulu changed the title /usr/bin/ld: /home/charleye/acrn-hypervisor/build/hypervisor/boot/reloc.o: relocation R_X86_64_32S against `.text.get_hv_image_delta' can not be used when making a shared object; recompile with -fPIC /home/charleye/acrn-hypervisor/build/hypervisor/boot/reloc.o: error adding symbols: Bad value relocation R_X86_64_32S against `.text.get_hv_image_delta' can not be used when making a shared object; recompile with -fPIC /home/charleye/acrn-hypervisor/build/hypervisor/boot/reloc.o: error adding symbols: Bad value Aug 31, 2018
@chasinglulu chasinglulu changed the title relocation R_X86_64_32S against `.text.get_hv_image_delta' can not be used when making a shared object; recompile with -fPIC /home/charleye/acrn-hypervisor/build/hypervisor/boot/reloc.o: error adding symbols: Bad value relocation R_X86_64_32S against `.text.get_hv_image_delta' can not be used when making a shared object; recompile with -fPIC acrn-hypervisor/build/hypervisor/boot/reloc.o: error adding symbols: Bad value Aug 31, 2018
@gvancuts
Copy link
Contributor

Could it be that you're hitting the issue that @junjiemao1 mentionned here? If so, upgrading your binutils to 2.27 or higher should solve this.

Or you can also try to revert this commit on your tree as an experiment (we do not recommend to remove it permanently, this is just for testing)

@chasinglulu
Copy link
Author

thank you!

@gvancuts
Copy link
Contributor

gvancuts commented Sep 3, 2018

FYI, there was (another?) problem with the relocation feature for which a patch just got merged - see #1120

@gvancuts
Copy link
Contributor

gvancuts commented Sep 5, 2018

Hi @chasinglulu , have you been able to resolve your problem? If so, can you please close this issue? Thanks!

@gvancuts
Copy link
Contributor

@chasinglulu @kiendinh can you confirm what exactly fixed the issue for you?

I would like to know if we need to amend our "Getting Started Guide" with additional instructions (or a note): https://projectacrn.github.io/latest/getting-started/apl-nuc.html#build-acrn-from-source

@kiendinh
Copy link
Contributor

@gvancuts, I used to checkout the tag which was known to compile (ie, acrn-2018w35.4-140000p). However today the latest master branch was built successfully on Ubuntu 16.04 with binutils 2.26. Some recent changes may have fixed the issue.

@gvancuts
Copy link
Contributor

gvancuts commented Sep 26, 2018 via email

@gvancuts
Copy link
Contributor

I'm re-opening this issue as using the latest binutils (2.26) version from the Ubuntu 16.04 repo does not work for me. Manually upgrading to 2.27 (or possibly higher) is required as far as I can tell.

@gvancuts gvancuts reopened this Apr 24, 2019
@gvancuts
Copy link
Contributor

Closing this issue as upgrading binutils to 2.27 solves the build issue on Ubuntu 16.04

@NanlinXie NanlinXie changed the title relocation R_X86_64_32S against `.text.get_hv_image_delta' can not be used when making a shared object; recompile with -fPIC acrn-hypervisor/build/hypervisor/boot/reloc.o: error adding symbols: Bad value Compile error using gcc version 4.8.5 (Ubuntu 4.8.5-4ubuntu2) Apr 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants