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

CMake error and '--help' unrecognized #1

Open
sagitaninta opened this issue May 20, 2021 · 1 comment
Open

CMake error and '--help' unrecognized #1

sagitaninta opened this issue May 20, 2021 · 1 comment

Comments

@sagitaninta
Copy link

Hi, I would like to do some base recalibration for my non-model WGS bam and trying to install kbbq due to my colleague's recommendation. However, I got error right from here from installing.

cmake -DCMAKE_BUILD_TYPE=Release ..
-- The C compiler identification is GNU 7.5.0
-- The CXX compiler identification is GNU 7.5.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at CMakeLists.txt:30 (install):
  install TARGETS given no RUNTIME DESTINATION for executable target
  "kbbq-bin".


-- Configuring incomplete, errors occurred!
See also "/home/btx638/software/kbbq/build/CMakeFiles/CMakeOutput.log".

I saw that I need to only change the CMakeList.txt like this:

cmake_minimum_required(VERSION 3.10)

# set the project name
project(kbbq)

# specify the C++ standard
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED True)

# library stuff
add_subdirectory(src/minionrng)
#add_library(hts SHARED IMPORTED)
add_subdirectory(src/kbbq)

# add the executable
add_executable(kbbq-bin src/kbbq/kbbq.cc)

# force native build to enable vectorization
add_compile_options(-march=native)

# add libraries for linking
target_link_libraries(kbbq-bin kbbq)

target_include_directories(kbbq-bin PUBLIC
                          "${PROJECT_SOURCE_DIR}/include/kbbq"
                          )

set_target_properties(kbbq-bin PROPERTIES OUTPUT_NAME kbbq)

install(TARGETS kbbq-bin
	RUNTIME DESTINATION src/kbbq) ####<---- this part is my edit

and I think it works:

~/software/kbbq/build$ cmake -DCMAKE_BUILD_TYPE=Release ..
-- Configuring done
-- Generating done
-- Build files have been written to: /home/btx638/software/kbbq/build
~/software/kbbq/build$ cmake --build .
[ 20%] Built target minionrng
[ 80%] Built target kbbq
[ 90%] Linking CXX executable kbbq
[100%] Built target kbbq-bin
~/software/kbbq/build$ cmake --install .
-- Configuring done
-- Generating done
-- Build files have been written to: /home/btx638/software/kbbq/build

But when I moved the kbbq executable to path and try to run kbbq, a very long empty output appears so that I have to kill it before trying kbbq --help according the tutorial:

~$ kbbq
^C
~$ kbbq --help
kbbq: unrecognized option '--help'
[2021-05-20 19:22:26 BST]  Unknown argument ?

I think kbbq is installed based on the message but it is difficult to know if it will work. Could you please tell me if this means I have installed this correctly?

@adamjorr
Copy link
Owner

Hi @sagitaninta,

Thanks for your question and the detailed example and solution. From what you've posted, it looks like your build and installation was successful. However, I do expect kbbq with no options to output help information, so that part is strange.

Unfortunately, we currently don't have any simple tests you can do right now to make sure your installation is working properly. I would try giving it a small dataset and seeing if it produces output without throwing an error.

Embarrassingly, we currently don't support a --help option. The documentation you link to is for the python prototype of this project. The message you see indicates to me that the binary is working, though!

If you try it and it doesn't work, please let me know and I can see if I can help figure out what went wrong.

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