Ubuntu cmake error
mengzyou opened this issue · 7 comments
When I build the source codes on ubuntu 18.04 with command:
$ cmake .
I get below errors:
:~/src/libks$ cmake .
-- cotire 1.7.10 loaded.
Platform is linux
Build type: Debug CXX Flags:
Install prefix: /usr
LibKS Version 1.3
CMake Error at CMakeLists.txt:291 (string):
string sub-command REPLACE requires at least four arguments.
Found UUID setup target at imported location: /usr/lib/x86_64-linux-gnu/libuuid.so
Compiler supports visibility
-- Configuring incomplete, errors occurred!
Still broken.
Platform is linux
Build type: Debug CXX Flags:
Install prefix: /usr
LibKS Version 1.6
Detecting last git tag to generate a Debian complian changelog.
fatal: Keine Tags können '1f34edd29b3cd2eba53eb7054d1b26b61d6a3af2' beschreiben.
Versuchen Sie --always oder erstellen Sie einige Tags.
fatal: Die Option '--count' muss vor den Argumenten kommen, die keine Optionen sind.
Found last git tag:
Generating a changelog using commits since git tag:
CMake Error at CMakeLists.txt:315 (string):
string sub-command REPLACE requires at least four arguments.
Found UUID setup target at imported location: /usr/lib/arm-linux-gnueabihf/libuuid.so
-- Found OpenSSL: /usr/lib/arm-linux-gnueabihf/libcrypto.so (found version "1.1.1d")
-- Found OpenSSL: /usr/lib/arm-linux-gnueabihf/libcrypto.so (found version "1.1.1d") found components: Crypto SSL
Compiler supports visibility
-- Configuring incomplete, errors occurred!
See also "/usr/src/libks/CMakeFiles/CMakeOutput.log".
See also "/usr/src/libks/CMakeFiles/CMakeError.log".
@vogt31337 You have an issue with git
:
fatal: Keine Tags können '1f34edd29b3cd2eba53eb7054d1b26b61d6a3af2' beschreiben.
Versuchen Sie --always oder erstellen Sie einige Tags.
fatal: Die Option '--count' muss vor den Argumenten kommen, die keine Optionen sind.
Although, I don't speak German.
Please show me the output of:
git status
and
git describe --tags --abbrev=0
@andywolk no i've no issues with git.
It just states
fatal: No tags 'alksjfskdöfsdf' can be written (doesn't make sense in german)
Try --always or create some tags
fatal: --count must be used before arguments, which are no options
git status:
no changes, on branch origin/fixgitchangelog
git describe --tags --abbrev=0
reproduces the error message from above.
I fixed it with adding a NOT in line 285 in CMakeLists.txt and ignoring this CHANGELOG.
Since the other one got closed, here's my systems information:
uname -a
Linux raspberrypi 5.4.83-v7+ #1379 SMP Mon Dec 14 13:08:57 GMT 2020 armv7l GNU/Linux
cat /etc/issue
Raspbian GNU/Linux 10
git status
On Branch origin/fixgitchangelog
nothing to commit, work dir clean
cmake .
Platform is linux
Build type: Release CXX Flags:
Install prefix: /usr
LibKS Version 1.6
Detecting last git tag to generate a Debian complian changelog.
fatal: No tags can write '1f34edd29b3cd2eba53eb7054d1b26b61d6a3af2'.
Try to use --always or create some tags
fatal: The option '--count' must be used before any arguments, which are no options.
Found last git tag:
Generating a changelog using commits since git tag:
CMake Error at CMakeLists.txt:315 (string):
string sub-command REPLACE requires at least four arguments.
Found UUID setup target at imported location: /usr/lib/arm-linux-gnueabihf/libuuid.so
-- Found OpenSSL: /usr/lib/arm-linux-gnueabihf/libcrypto.so (found version "1.1.1d")
-- Found OpenSSL: /usr/lib/arm-linux-gnueabihf/libcrypto.so (found version "1.1.1d") found components: Crypto SSL
Compiler supports visibility
-- Configuring incomplete, errors occurred!
See also "/usr/src/libks/CMakeFiles/CMakeOutput.log".
See also "/usr/src/libks/CMakeFiles/CMakeError.log".
cat CMakeFiles/CMakeError.log:
Determining if the pthread_create exist failed with the following output:
Change Dir: /usr/src/libks/CMakeFiles/CMakeTmp
Run Build Command:"/usr/bin/make" "cmTC_6d4bc/fast"
/usr/bin/make -f CMakeFiles/cmTC_6d4bc.dir/build.make CMakeFiles/cmTC_6d4bc.dir/build
make[1]: Verzeichnis „/usr/src/libks/CMakeFiles/CMakeTmp“ wird betreten
Building C object CMakeFiles/cmTC_6d4bc.dir/CheckSymbolExists.c.o
/usr/bin/cc -std=c11 -fPIE -o CMakeFiles/cmTC_6d4bc.dir/CheckSymbolExists.c.o -c /usr/src/libks/CMakeFiles/CMakeTmp/CheckSymbolExists.c
Linking C executable cmTC_6d4bc
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_6d4bc.dir/link.txt --verbose=1
/usr/bin/cc -std=c11 CMakeFiles/cmTC_6d4bc.dir/CheckSymbolExists.c.o -o cmTC_6d4bc
/usr/bin/ld: CMakeFiles/cmTC_6d4bc.dir/CheckSymbolExists.c.o: in function main': CheckSymbolExists.c:(.text+0x48): undefined reference to pthread_create'
collect2: error: ld returned 1 exit status
make[1]: *** [CMakeFiles/cmTC_6d4bc.dir/build.make:87: cmTC_6d4bc] Fehler 1
make[1]: Verzeichnis „/usr/src/libks/CMakeFiles/CMakeTmp“ wird verlassen
make: *** [Makefile:121: cmTC_6d4bc/fast] Fehler 2
File /usr/src/libks/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
/* */
#include <pthread.h>
int main(int argc, char** argv)
{
(void)argv;
#ifndef pthread_create
return ((int*)(&pthread_create))[argc];
#else
(void)argc;
return 0;
#endif
}
CMakeOutput.log:
CMakeOutput.log
@mengzyou I believe this issue is resolved by 46da9a3#diff-1e7de1ae2d059d21e1dd75d5812d5a34b0222cef273b7c3a2af62eb747f9d20a
Please reopen if you have a problem with this still.
@vogt31337 out discussion continues in #90