build error with vg tools
1
0
Entering edit mode
9 months ago
rimo ▴ 10

I am trying to use vg tools on my AWS Ubuntu server and it won't compile.

I followed the instructions listed here but when I get to the point where I need to build with . ./source_me.sh && make it gives me this error:

CMake Error at test/CMakeLists.txt:54 (ADD_CUSTOM_TARGET):
  ADD_CUSTOM_TARGET cannot create target "COMMAND" because another target
  with the same name already exists.  The existing target is a custom target
  created in source directory "/home/ubuntu/vg-v1.49.0/deps/sdsl-lite/test".
  See documentation for policy CMP0002 for more details.


CMake Error at test/CMakeLists.txt:47 (STRING):
  STRING sub-command REGEX, mode REPLACE needs at least 6 arguments total to
  command.


CMake Error at test/CMakeLists.txt:49 (ADD_EXECUTABLE):
  ADD_EXECUTABLE cannot create target "EXCLUDE_FROM_ALL" because another
  target with the same name already exists.  The existing target is an
  executable created in source directory
  "/home/ubuntu/vg-v1.49.0/deps/sdsl-lite/test".  See documentation for
  policy CMP0002 for more details.


CMake Error at test/CMakeLists.txt:54 (ADD_CUSTOM_TARGET):
  ADD_CUSTOM_TARGET cannot create target "COMMAND" because another target
  with the same name already exists.  The existing target is a custom target
  created in source directory "/home/ubuntu/vg-v1.49.0/deps/sdsl-lite/test".
  See documentation for policy CMP0002 for more details.


CMake Error at test/CMakeLists.txt:47 (STRING):
  STRING sub-command REGEX, mode REPLACE needs at least 6 arguments total to
  command.


CMake Error at test/CMakeLists.txt:49 (ADD_EXECUTABLE):
  ADD_EXECUTABLE cannot create target "EXCLUDE_FROM_ALL" because another
  target with the same name already exists.  The existing target is an
  executable created in source directory
  "/home/ubuntu/vg-v1.49.0/deps/sdsl-lite/test".  See documentation for
  policy CMP0002 for more details.


CMake Error at test/CMakeLists.txt:54 (ADD_CUSTOM_TARGET):
  ADD_CUSTOM_TARGET cannot create target "COMMAND" because another target
  with the same name already exists.  The existing target is a custom target
  created in source directory "/home/ubuntu/vg-v1.49.0/deps/sdsl-lite/test".
  See documentation for policy CMP0002 for more details.


CMake Error at test/CMakeLists.txt:47 (STRING):
  STRING sub-command REGEX, mode REPLACE needs at least 6 arguments total to
  command.


CMake Error at test/CMakeLists.txt:49 (ADD_EXECUTABLE):
  ADD_EXECUTABLE cannot create target "EXCLUDE_FROM_ALL" because another
  target with the same name already exists.  The existing target is an
  executable created in source directory
  "/home/ubuntu/vg-v1.49.0/deps/sdsl-lite/test".  See documentation for
  policy CMP0002 for more details.


CMake Error at test/CMakeLists.txt:54 (ADD_CUSTOM_TARGET):
  ADD_CUSTOM_TARGET cannot create target "COMMAND" because another target
  with the same name already exists.  The existing target is a custom target
  created in source directory "/home/ubuntu/vg-v1.49.0/deps/sdsl-lite/test".
  See documentation for policy CMP0002 for more details.


-- Configuring incomplete, errors occurred!
See also "/home/ubuntu/vg-v1.49.0/deps/sdsl-lite/build/CMakeFiles/CMakeOutput.log".
See also "/home/ubuntu/vg-v1.49.0/deps/sdsl-lite/build/CMakeFiles/CMakeError.log".
ERROR: CMake build failed.
make: *** [Makefile:548: lib/libsdsl.a] Error 1

This is a cut off of the entire message but it basically repeats itself multiple times; if someone needs to see the entire error please let me know. I don't understand what it means - if someone can explain it and a potential solution that would be great!

ubuntu vg vgtools • 1.2k views
ADD COMMENT
0
Entering edit mode

Which CMake / compiler / Ubuntu / kernel versions are you using? Is this a fresh Ubuntu instance or something you have already been using for a while?

Usually a fresh Ubuntu virtual machine is the easiest environment for compiling vg. The more things you install, the more likely it becomes that you get conflicts with something needed by vg.

ADD REPLY
0
Entering edit mode

I've been using this Ubuntu instance for a couple of months now.

The version of Ubuntu is 22.04.1 LTS (GNU/Linux 5.19.0-1028-aws x86_64) with CMake v3.22.1.

I'll try setting up a fresh Ubuntu instance today and see if that helps!

ADD REPLY
0
Entering edit mode

I encountered a similar error on the OpenEuler system. I don't know how to solve these problems.

CMake Error at test/CMakeLists.txt:47 (STRING):
  STRING sub-command REGEX, mode REPLACE needs at least 6 arguments total to
  command.

CMake Error at test/CMakeLists.txt:47 (STRING):
  STRING sub-command REGEX, mode REPLACE needs at least 6 arguments total to
  command.

CMake Error at test/CMakeLists.txt:49 (ADD_EXECUTABLE):
  ADD_EXECUTABLE cannot create target "EXCLUDE_FROM_ALL" because another
  target with the same name already exists.  The existing target is an
  executable created in source directory
  "/home/Software/vg-v1.50.1/deps/sdsl-lite/test".  See documentation for
  policy CMP0002 for more details.


CMake Error at test/CMakeLists.txt:54 (ADD_CUSTOM_TARGET):
  ADD_CUSTOM_TARGET cannot create target "COMMAND" because another target
  with the same name already exists.  The existing target is a custom target
  created in source directory
  "/home/Software/vg-v1.50.1/deps/sdsl-lite/test".  See documentation for
  policy CMP0002 for more details.


CMake Error at test/CMakeLists.txt:47 (STRING):
  STRING sub-command REGEX, mode REPLACE needs at least 6 arguments total to
  command.
ADD REPLY
0
Entering edit mode

I think the problem is caused by sdsl-lite, which seems to be an incompatibility issue due to the high version of cmake. I checked the sdsl github library and found that it hasn't been updated in a long time. But does anyone have another way?

ADD REPLY
0
Entering edit mode

I found a solution. Maybe I can give it a try. Download the latest sdsl-lite from this URL (https://github.com/vgteam/sdsl-lite/releases/tag/v2.3.1-vgteam), then unzip and replace the contents in vg/deps/sdsl-lite to solve the problem.

ADD REPLY
0
Entering edit mode
7 months ago

Why not just make your life easy and download the binary from here ?

wget https://github.com/vgteam/vg/releases/download/v1.50.1/vg 
ADD COMMENT
0
Entering edit mode

I want to use it on an aarch64 architecture Linux machine. But at present I always encounter a lot of errors can not use.

ADD REPLY

Login before adding your answer.

Traffic: 1759 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6