security/botan2 - solved

Has anybody else had problems building the new 2.13 version?
At first it looked like a repetition of a problem from seven months ago but this time it seems to be having trouble with a client (roughtime) that is new in 2.13


Code:
make 
===>  Building for botan2-2.13.0
gmake[2]: Entering directory '/usr/ports/security/botan2/work/Botan-2.13.0'
c++ -Wl,-rpath=\$ORIGIN -L/usr/local/lib -fstack-protector -pthread build/obj/cli/argon2.o build/obj/cli/asn1.o build/obj/cli/bcrypt.o build/obj/cli/cc_enc.o build/obj/cli/cli.o build/obj/cli/cli_rng.o build/obj/cli/codec.o build/obj/cli/compress.o build/obj/cli/encryption.o build/obj/cli/entropy.o build/obj/cli/hash.o build/obj/cli/hmac.o build/obj/cli/main.o build/obj/cli/math.o build/obj/cli/pbkdf.o build/obj/cli/pk_crypt.o build/obj/cli/psk.o build/obj/cli/pubkey.o build/obj/cli/roughtime.o build/obj/cli/sandbox.o build/obj/cli/speed.o build/obj/cli/timing_tests.o build/obj/cli/tls_client.o build/obj/cli/tls_http_server.o build/obj/cli/tls_proxy.o build/obj/cli/tls_server.o build/obj/cli/tls_utils.o build/obj/cli/tss.o build/obj/cli/utils.o build/obj/cli/x509.o -L. -lbotan-2 -lboost_system -lbz2 -lcrypto -llzma -lsqlite3 -lz -pthread  -fstack-protector-strong  -o botan
ld: error: undefined symbol: Botan::Roughtime::Chain::Chain(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)
>>> referenced by roughtime.cpp
>>>               build/obj/cli/roughtime.o:(Botan_CLI::RoughtimeCheck::go())

ld: error: undefined symbol: Botan::Roughtime::Chain::responses() const
>>> referenced by roughtime.cpp
>>>               build/obj/cli/roughtime.o:(Botan_CLI::RoughtimeCheck::go())

ld: error: undefined symbol: Botan::Roughtime::Chain::Chain(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)
>>> referenced by roughtime.cpp
>>>               build/obj/cli/roughtime.o:(Botan_CLI::Roughtime::go())

ld: error: undefined symbol: Botan::Roughtime::servers_from_str(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)
>>> referenced by roughtime.cpp
>>>               build/obj/cli/roughtime.o:(Botan_CLI::Roughtime::go())

ld: error: undefined symbol: Botan::Roughtime::Chain::to_string() const
>>> referenced by roughtime.cpp
>>>               build/obj/cli/roughtime.o:(Botan_CLI::Roughtime::go())

ld: error: undefined symbol: Botan::Roughtime::Nonce::Nonce(Botan::RandomNumberGenerator&)
>>> referenced by roughtime.cpp
>>>               build/obj/cli/roughtime.o:(Botan_CLI::Roughtime::query(std::__1::unique_ptr<Botan::Roughtime::Chain, std::__1::default_delete<Botan::Roughtime::Chain> >&, unsigned long, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, Botan::Ed25519_PublicKey const&))

ld: error: undefined symbol: Botan::Roughtime::Chain::next_nonce(Botan::Roughtime::Nonce const&) const
>>> referenced by roughtime.cpp
>>>               build/obj/cli/roughtime.o:(Botan_CLI::Roughtime::query(std::__1::unique_ptr<Botan::Roughtime::Chain, std::__1::default_delete<Botan::Roughtime::Chain> >&, unsigned long, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, Botan::Ed25519_PublicKey const&))

ld: error: undefined symbol: Botan::Roughtime::Nonce::Nonce(Botan::RandomNumberGenerator&)
>>> referenced by roughtime.cpp
>>>               build/obj/cli/roughtime.o:(Botan_CLI::Roughtime::query(std::__1::unique_ptr<Botan::Roughtime::Chain, std::__1::default_delete<Botan::Roughtime::Chain> >&, unsigned long, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, Botan::Ed25519_PublicKey const&))

ld: error: undefined symbol: Botan::Roughtime::online_request(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, Botan::Roughtime::Nonce const&, std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000l> >)
>>> referenced by roughtime.cpp
>>>               build/obj/cli/roughtime.o:(Botan_CLI::Roughtime::query(std::__1::unique_ptr<Botan::Roughtime::Chain, std::__1::default_delete<Botan::Roughtime::Chain> >&, unsigned long, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, Botan::Ed25519_PublicKey const&))

ld: error: undefined symbol: Botan::Roughtime::Response::from_bits(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > const&, Botan::Roughtime::Nonce const&)
>>> referenced by roughtime.cpp
>>>               build/obj/cli/roughtime.o:(Botan_CLI::Roughtime::query(std::__1::unique_ptr<Botan::Roughtime::Chain, std::__1::default_delete<Botan::Roughtime::Chain> >&, unsigned long, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, Botan::Ed25519_PublicKey const&))

ld: error: undefined symbol: Botan::Roughtime::Response::validate(Botan::Ed25519_PublicKey const&) const
>>> referenced by roughtime.cpp
>>>               build/obj/cli/roughtime.o:(Botan_CLI::Roughtime::query(std::__1::unique_ptr<Botan::Roughtime::Chain, std::__1::default_delete<Botan::Roughtime::Chain> >&, unsigned long, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, Botan::Ed25519_PublicKey const&))

ld: error: undefined symbol: Botan::Roughtime::Chain::append(Botan::Roughtime::Link const&, unsigned long)
>>> referenced by roughtime.cpp
>>>               build/obj/cli/roughtime.o:(Botan_CLI::Roughtime::query(std::__1::unique_ptr<Botan::Roughtime::Chain, std::__1::default_delete<Botan::Roughtime::Chain> >&, unsigned long, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, Botan::Ed25519_PublicKey const&))
c++: error: linker command failed with exit code 1 (use -v to see invocation)
gmake[2]: *** [Makefile:71: botan] Error 1
gmake[2]: Leaving directory '/usr/ports/security/botan2/work/Botan-2.13.0'
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/security/botan2
*** Error code 1
 
Oh, and make sure to run make clean before attempting to build it again. The log you posted seems to go from Building for botan2-2.13.0 straight to one of the last compile statements of the build, skipping a whole bunch of intermediates. Probably because of earlier, failed, build attempts.
 
Thanks, there is no /etc/make.conf on the current system.
Its a FreeBSD 12.1-STABLE r356027 GENERIC amd64
Yes the above is the output from a make after a failed make, but it was after like the third cycle of "make clean ; make" while I tested whether it was an issue of confusion with python versions, but no luck with that testing; it pulls in python 3.7 itself then fails, also ends with the same fail while python 2.7 is back in and while python 3.6 is back in.
From another fresh build failure, the last two succesful links before the fail are as follows;

cd . && ln -fs libbotan-2.so.13 libbotan-2.so
cd . && ln -fs libbotan-2.so.13 libbotan-2.so.13.13.0
c++ -Wl,-rpath=\$ORIGIN -L/usr/local/lib -fstack-protector -pthread build/obj/cli/argon2.o build/obj/cli/asn1.o build/obj/cli/bcrypt.o build/obj/cli/cc_enc.o build/obj/cli/cli.o build/obj/cli/cli_rng.o build/obj/cli/codec.o build/obj/cli/compress.o build/obj/cli/encryption.o build/obj/cli/entropy.o build/obj/cli/hash.o build/obj/cli/hmac.o build/obj/cli/main.o build/obj/cli/math.o build/obj/cli/pbkdf.o build/obj/cli/pk_crypt.o build/obj/cli/psk.o build/obj/cli/pubkey.o build/obj/cli/roughtime.o build/obj/cli/sandbox.o build/obj/cli/speed.o build/obj/cli/timing_tests.o build/obj/cli/tls_client.o build/obj/cli/tls_http_server.o build/obj/cli/tls_proxy.o build/obj/cli/tls_server.o build/obj/cli/tls_utils.o build/obj/cli/tss.o build/obj/cli/utils.o build/obj/cli/x509.o -L. -lbotan-2 -lboost_system -lbz2 -lcrypto -llzma -lsqlite3 -lz -pthread -fstack-protector-strong -o botan
ld: error: undefined symbol: Botan::Roughtime::Chain::Chain(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)
>>> referenced by roughtime.cpp
>>> build/obj/cli/roughtime.o:(Botan_CLI::RoughtimeCheck::go())
ld: error: undefined symbol: Botan::Roughtime::Chain::responses() const
 
while I tested whether it was an issue of confusion with python versions, but no luck with that testing; it pulls in python 3.7 itself then fails, also ends with the same fail while python 2.7 is back in and while python 3.6 is back in.
I think this might be the underlying cause. The default switched to Python 3.7 some time ago. Your system still appears to be on 3.6.
 
botan2 needs generally to be totally deinstalled FIRST before building a new version.
This is based on my own experience.
On each update, botan2 build fails on my system... it builds and installs fine as long as the previous version is deinstalled :

Code:
make -C /usr/ports/security/botan2 deinstall
make -C /usr/ports/security/botan2 clean
make -C /usr/ports/security/botan2 install clean

As I can remember the port maintainer does warn user to remove the previous version somewhere (perhaps in a bug tracker message...)
 
That's probably why it builds just fine with poudriere as it always starts with a clean environment.
 
botan2 needs generally to be totally deinstalled FIRST before building a new version.
This is based on my own experience.
On each update, botan2 build fails on my system... it builds and installs fine as long as the previous version is deinstalled :

Code:
make -C /usr/ports/security/botan2 deinstall
make -C /usr/ports/security/botan2 clean
make -C /usr/ports/security/botan2 install clean

As I can remember the port maintainer does warn user to remove the previous version somewhere (perhaps in a bug tracker message...)
That was it, YES thankyou Wozzeck.Live. An essential note, and I'd searched UPDATING to no avail.
 
I think this might be the underlying cause. The default switched to Python 3.7 some time ago. Your system still appears to be on 3.6.
No my system is default on Python3.7 but many ports are still claiming to depend on 3.6 such as
e.g. doxygen, libarea, gstreamer1, signon-ui, gtk2, gnome-desktop, llvm80, qt5, plasma5, xwayland, ffmpeg, libreoffice, gimp-app, mesa-dri, nvidia-driver, etc.
 
Back
Top