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

Compilation issue on 20.04 #49

Open
xepost opened this issue Apr 7, 2023 · 4 comments
Open

Compilation issue on 20.04 #49

xepost opened this issue Apr 7, 2023 · 4 comments

Comments

@xepost
Copy link

xepost commented Apr 7, 2023

Hi ,

I go ahead with the recommendation of "-std=c++14" change in the cmakes, and installed dw. All is compiling other than lkh_tsp_solver. I am getting the following error.

usr/bin/ld: CMakeFiles/lkh_tsp_solver.dir/src/SolveCompressedSubproblem.c.o:(.bss+0xa0): multiple definition of PatchingCExtended; CMakeFiles/lkh_tsp_solver.dir/src/Activate.c.o:(.bss+0xa0): first defined here /usr/bin/ld: CMakeFiles/lkh_tsp_solver.dir/src/SolveCompressedSubproblem.c.o:(.bss+0xa4): multiple definition of PatchingARestricted; CMakeFiles/lkh_tsp_solver.dir/src/Activate.c.o:(.bss+0xa4): first defined here /usr/bin/ld: CMakeFiles/lkh_tsp_solver.dir/src/SolveCompressedSubproblem.c.o:(.bss+0xa8): multiple definition of PatchingAExtended; CMakeFiles/lkh_tsp_solver.dir/src/Activate.c.o:(.bss+0xa8): first defined here /usr/bin/ld: CMakeFiles/lkh_tsp_solver.dir/src/SolveCompressedSubproblem.c.o:(.bss+0xac): multiple definition of MoorePartitioning; CMakeFiles/lkh_tsp_solver.dir/src/Activate.c.o:(.bss+0xac): first defined here /usr/bin/ld: CMakeFiles/lkh_tsp_solver.dir/src/SolveCompressedSubproblem.c.o:(.bss+0xb0): multiple definition of KMeansPartitioning; CMakeFiles/lkh_tsp_solver.dir/src/Activate.c.o:(.bss+0xb0): first defined here

I did take a look at RACER repo, where they recommend installing LKH-3.0.6 on the system-wide. I tried to compile the LKH-3.0.6 and I get the same error. Also checked LKH-3.0.5, which also does not compile on Ubuntu20.04, LKH-3.0.7 and LKH-3.0.8 compiles but there are some changes on the APIs, so not sure how to add that part. Any recommendations?

@xepost
Copy link
Author

xepost commented Apr 13, 2023

I solved it by downgrading to gcc/g++9, I was using gcc/g++ 11. Please feel free to close.

@romaster93
Copy link

hello

i downgraded to gcc/g++ version 9, but the same error continues to occur.

is there any other way,...?

thanks

@xepost
Copy link
Author

xepost commented Oct 30, 2023

@romaster93 can you give more details ? Did you set the gcc/g++-9 as the default ? What is the result of gcc -v ?

@romaster93
Copy link

@xepost

gcc -v result :

Using built-in specs.
COLLECT_GCC=/usr/bin/gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/9/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none:hsa
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 9.4.0-1ubuntu120.04.2' --with-bugurl=file:///usr/share/doc/gcc-9/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,gm2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-9 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-9-9QDOt0/gcc-9-9.4.0/debian/tmp-nvptx/usr,hsa --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 9.4.0 (Ubuntu 9.4.0-1ubuntu1
20.04.2)

but still cannot build ..... :(

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

2 participants