Make fails
AncientiCe opened this issue · 3 comments
Hi,
I'm trying to build the project but it fails on both test and release:
gowarcraft3/vendor/StormLib/src/libtomcrypt/src/pk/rsa/rsa_verify_simple.c:58:12: error: implicit declaration of function 'LibTomMalloc' is invalid in C99
[-Werror,-Wimplicit-function-declaration]
tmpbuf = XMALLOC(siglen);
Any ideas on this?
MacOS Big Sur / 11.2.1
I have not seen this before, but it seems related to StormLib, a third party library. Can you try building this manually? I don't have access to a macOS system, but build/tests do seem to pass on macOS via Travis.
Maybe we have to update StormLib to a newer version, but I don't see anything in their changelog related to this.
Tried building only the module and I got the same message.
Will do some tries, see if i can fix it, maybe it's a dependency I don't have.
I think we can close this since you can't repro it on Travis and i'll come back if i find something.
Off: I think a package changed url
master...AncientiCe:master
Edit: after updating the vendor still get the same error here:
[ 8%] Building C object CMakeFiles/storm.dir/src/libtomcrypt/src/pk/rsa/rsa_verify_simple.c.o
EDIT2: I fixed it by declaring the methods macroed inside the StormLib package:
File StormLib/src/libtomcrypt/src/headers/tomcrypt.h
Bottom of file added:
LTC_EXPORT void * LTC_CALL LibTomMalloc(size_t n);
LTC_EXPORT void * LTC_CALL LibTomCalloc(size_t n, size_t s);
LTC_EXPORT void * LTC_CALL LibTomRealloc(void *p, size_t n);
LTC_EXPORT void LTC_CALL LibTomFree(void * p);
LTC_EXPORT clock_t LTC_CALL LibTomClock(void);
LTC_EXPORT void LTC_CALL LibTomQsort(void *base, size_t nmemb, size_t size, int(LTC_CALL * compar)(const void *, const void *));
Now i'm getting the following on the make release:
Makefile:42: warning: overriding commands for target `gowarcraft3/cmd/bncsclient'
Makefile:39: warning: ignoring old commands for target `gowarcraft3/cmd/bncsclient'
Makefile:42: warning: overriding commands for target `gowarcraft3/cmd/bncsdump'
Makefile:39: warning: ignoring old commands for target `gowarcraft3/cmd/bncsdump'
Makefile:42: warning: overriding commands for target `gowarcraft3/cmd/capiclient'
Makefile:39: warning: ignoring old commands for target `gowarcraft3/cmd/capiclient'
Makefile:42: warning: overriding commands for target `gowarcraft3/cmd/w3gdump'
Makefile:39: warning: ignoring old commands for target `gowarcraft3/cmd/w3gdump'
Makefile:42: warning: overriding commands for target `gowarcraft3/cmd/w3gsclient'
Makefile:39: warning: ignoring old commands for target `gowarcraft3/cmd/w3gsclient'
Makefile:42: warning: overriding commands for target `gowarcraft3/cmd/w3gsdump'
Makefile:39: warning: ignoring old commands for target `gowarcraft3/cmd/w3gsdump'
Makefile:42: warning: overriding commands for target `gowarcraft3/cmd/w3mdump'
Makefile:39: warning: ignoring old commands for target `gowarcraft3/cmd/w3mdump'
cd bin; go build github.com/nielsAD/gowarcraft3/cmd/gowarcraft3/cmd/bncsclient
cannot find package "github.com/nielsAD/gowarcraft3/cmd/gowarcraft3/cmd/bncsclient" in any of:
/usr/local/Cellar/go/1.15.7_1/libexec/src/github.com/nielsAD/gowarcraft3/cmd/gowarcraft3/cmd/bncsclient (from $GOROOT)
/go/src/github.com/nielsAD/gowarcraft3/cmd/gowarcraft3/cmd/bncsclient (from $GOPATH)
make: *** [gowarcraft3/cmd/bncsclient] Error 1
Edit 3 : (i hope i'm moving forward not bottlenecking somewhere else)
Changed the Makefile#42 to
cd $(DIR_BIN); $(GO) build $(GO_FLAGS) $@
Now i'm getting this:
Makefile:42: warning: overriding commands for target `gowarcraft3/cmd/bncsclient'
Makefile:39: warning: ignoring old commands for target `gowarcraft3/cmd/bncsclient'
Makefile:42: warning: overriding commands for target `gowarcraft3/cmd/bncsdump'
Makefile:39: warning: ignoring old commands for target `gowarcraft3/cmd/bncsdump'
Makefile:42: warning: overriding commands for target `gowarcraft3/cmd/capiclient'
Makefile:39: warning: ignoring old commands for target `gowarcraft3/cmd/capiclient'
Makefile:42: warning: overriding commands for target `gowarcraft3/cmd/w3gdump'
Makefile:39: warning: ignoring old commands for target `gowarcraft3/cmd/w3gdump'
Makefile:42: warning: overriding commands for target `gowarcraft3/cmd/w3gsclient'
Makefile:39: warning: ignoring old commands for target `gowarcraft3/cmd/w3gsclient'
Makefile:42: warning: overriding commands for target `gowarcraft3/cmd/w3gsdump'
Makefile:39: warning: ignoring old commands for target `gowarcraft3/cmd/w3gsdump'
Makefile:42: warning: overriding commands for target `gowarcraft3/cmd/w3mdump'
Makefile:39: warning: ignoring old commands for target `gowarcraft3/cmd/w3mdump'
cd bin; go build gowarcraft3/cmd/bncsclient
# github.com/nielsAD/gowarcraft3/network/bnet
ld: warning: directory not found for option '-L/Users/d443427/go/src/github.com/nielsAD/gowarcraft3/network/bnet/../../vendor/bncsutil/build'
ld: library not found for -lbncsutil_static
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [gowarcraft3/cmd/bncsclient] Error 2
Adding the defined functions in the StormLib package fixed it for me.
Closing (hopefully i'll have time to create a PR on the package repo)