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

Checkout & Build of Tagged Version 1.6.0 doesn't work #90

Open
vogt31337 opened this issue Jan 22, 2021 · 5 comments
Open

Checkout & Build of Tagged Version 1.6.0 doesn't work #90

vogt31337 opened this issue Jan 22, 2021 · 5 comments

Comments

@vogt31337
Copy link

Hi,

Expected Behaviour
Start with a clean environment, check out latest tagged version and build it

What happened
Didn't build, since the cmake system tried to read out some tag informations to create a CHANGELOG file.
Related to #42.

--
Would be nice if you could produce the changelog file not on the fly for the tagged versions.

@andywolk
Copy link
Contributor

Can not reproduce. Please reopen the issue once you are able to provide all the information and steps to reproduce. For example you don't mention the architecture, it is seen in #42 that you are on armhf. Next time put everything in one ticket and don't split.

@vogt31337
Copy link
Author

Ok I can put everything in here, just trying to help. Since I'm originally trying to install freeswitch.

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

@andywolk andywolk reopened this Jan 22, 2021
@andywolk
Copy link
Contributor

Why fixgitchangelog and not master or release ?

@bastibrunner
Copy link

I just had similar problem, with just a slightly different error message, when using dockerfile's ADD directly from git, which is obviously doing a shallow clone or similar:

warning: refname 'v2.0.3' is ambiguous.
Found last git tag: v2.0.3
No commits since git tag 'v2.0.3' to generate a changelog, looking for a previous tag
warning: refname 'v2.0.3' is ambiguous.
fatal: Not a valid object name v2.0.3^

With a little hint from #179, I came to running

git fetch --unshallow

which fixed it for me

@crazybolillo
Copy link

Also happening to me. The unshallow step fixed it for me. Maybe we can add a flag to skip change log generation so that shallow clones work?

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

4 participants