BlockchainCommons / seedtool-cli

Cryptographic Seed Tool for the command line
Other
27 stars 16 forks source link

fix build #37

Closed gorazdko closed 3 years ago

gorazdko commented 4 years ago

Abstract

Fixes build on linux and windows with proper check for bc-ur library. Does not address the problem with 3 unit tests.

On windows tests are turned off as there's no shunit2 package available there.

Status

ready for review

ChristopherA commented 4 years ago

@WolfMcNally, this one should be yours to test and merge. @ksedgwic it would be useful if you can also ACK.

gorazdko commented 4 years ago

Im trying to put AC_CHECK_LIB for bc-ur back in as per discussion with Wolf, but it's is being rejected by windows. Will try for another hour, otherwise Ill put AC_CHECK_LIB back in with broken windows support.

configure:3720: checking for crc32n in -lbc-ur
configure:3745: clang -o conftest.exe  -I/home/bc-seedtool-cli/sysroot/include   -L/home/bc-seedtool-cli/sysroot/lib conftest.c -lbc-ur  -lbc-bip39 -lbc-sskr -lbc-shamir -lbc-crypto-base  >&5
C:\msys64\mingw64\bin\ld: C:/msys64/home/bc-seedtool-cli/sysroot/lib/libbc-ur.a(crc32.o): in function `crc32n':
C:\msys64\home\bc-seedtool-cli\deps\bc-ur\src/crc32.c:42: undefined reference to `__imp_htonl'
clang: error: linker command failed with exit code 1 (use -v to see invocation)

It's like the configure script doesn't see -lws2_32 when building.

Edit:

I will update soon: -lws2_32 has to be passed as the last argument of AC_CHECK_LIB or with LIBS=-lws2_32

gorazdko commented 3 years ago

Fixes build on linux and windows with proper check for bc-ur library.

Does not address the problem with 3 unit tests.

Needs https://github.com/BlockchainCommons/bc-ur/pull/3

Ready for review

gorazdko commented 3 years ago

LGTM although we will need to add back a check for bc-ur that works cross-platform.

It's there and it works cross platform

gorazdko commented 3 years ago

Also it needs this https://github.com/BlockchainCommons/bc-ur/pull/3