PurpleI2P / i2pd-tools

Some useful tools for I2P
BSD 3-Clause "New" or "Revised" License
119 stars 38 forks source link

Not building (make) under FreeBSD #74

Closed click0 closed 3 years ago

click0 commented 3 years ago

Not building (make) under FreeBSD.

:/usr/local/i2pd-tools# make
make: "/usr/local/i2pd-tools/Makefile" line 11: Missing dependency operator
make: "/usr/local/i2pd-tools/Makefile" line 13: Missing dependency operator
make: "/usr/local/i2pd-tools/Makefile" line 14: warning: duplicate script for target "ifeq" ignored
make: "/usr/local/i2pd-tools/Makefile" line 12: warning: using previous script for "ifeq" defined here
make: "/usr/local/i2pd-tools/Makefile" line 15: Missing dependency operator
make: "/usr/local/i2pd-tools/Makefile" line 16: warning: duplicate script for target "else" ignored
make: "/usr/local/i2pd-tools/Makefile" line 14: warning: using previous script for "else" defined here
make: "/usr/local/i2pd-tools/Makefile" line 16: warning: duplicate script for target "ifeq" ignored
make: "/usr/local/i2pd-tools/Makefile" line 12: warning: using previous script for "ifeq" defined here
make: "/usr/local/i2pd-tools/Makefile" line 17: Need an operator
make: "/usr/local/i2pd-tools/Makefile" line 21: Need an operator
make: "/usr/local/i2pd-tools/Makefile" line 28: Missing dependency operator
make: "/usr/local/i2pd-tools/Makefile" line 29: warning: duplicate script for target "ifeq" ignored
make: "/usr/local/i2pd-tools/Makefile" line 12: warning: using previous script for "ifeq" defined here
make: "/usr/local/i2pd-tools/Makefile" line 29: warning: duplicate script for target "(,Linux)" ignored
make: "/usr/local/i2pd-tools/Makefile" line 12: warning: using previous script for "(,Linux)" defined here
make: "/usr/local/i2pd-tools/Makefile" line 30: Missing dependency operator
make: "/usr/local/i2pd-tools/Makefile" line 31: warning: duplicate script for target "else" ignored
make: "/usr/local/i2pd-tools/Makefile" line 14: warning: using previous script for "else" defined here
make: "/usr/local/i2pd-tools/Makefile" line 31: warning: duplicate script for target "ifeq" ignored
make: "/usr/local/i2pd-tools/Makefile" line 12: warning: using previous script for "ifeq" defined here
make: "/usr/local/i2pd-tools/Makefile" line 31: warning: duplicate script for target "(,Darwin)" ignored
make: "/usr/local/i2pd-tools/Makefile" line 14: warning: using previous script for "(,Darwin)" defined here
make: "/usr/local/i2pd-tools/Makefile" line 32: warning: duplicate script for target "else" ignored
make: "/usr/local/i2pd-tools/Makefile" line 14: warning: using previous script for "else" defined here
make: "/usr/local/i2pd-tools/Makefile" line 32: warning: duplicate script for target "ifeq" ignored
make: "/usr/local/i2pd-tools/Makefile" line 12: warning: using previous script for "ifeq" defined here
make: "/usr/local/i2pd-tools/Makefile" line 32: warning: duplicate script for target "(,Darwin)" ignored
make: "/usr/local/i2pd-tools/Makefile" line 14: warning: using previous script for "(,Darwin)" defined here
make: "/usr/local/i2pd-tools/Makefile" line 33: warning: duplicate script for target "else" ignored
make: "/usr/local/i2pd-tools/Makefile" line 14: warning: using previous script for "else" defined here
make: "/usr/local/i2pd-tools/Makefile" line 33: warning: duplicate script for target "ifeq" ignored
make: "/usr/local/i2pd-tools/Makefile" line 12: warning: using previous script for "ifeq" defined here
make: "/usr/local/i2pd-tools/Makefile" line 33: warning: duplicate script for target "(,Darwin)" ignored
make: "/usr/local/i2pd-tools/Makefile" line 14: warning: using previous script for "(,Darwin)" defined here
...

But gmake starts to collect something, albeit a number of warnings, for example:

libi2pd/Tunnel.h:123:17: warning: 'i2p::tunnel::OutboundTunnel::SendTunnelDataMsg' hides overloaded virtual function [-Woverloaded-virtual]
                        virtual void SendTunnelDataMsg (const std::vector<TunnelMessageBlock>& msgs); // multiple messages

As a result, the assembly ended with an error:

...
c++ -o regaddralias.o -c -Wall -std=c++11 -Wno-misleading-indentation -g -Ii2pd/libi2pd -Ii2pd/libi2pd_client -I/usr/local/include regaddralias.cpp
c++ -o regaddralias regaddralias.o -L/usr/local/lib  i2pd/libi2pd.a -lboost_system -lboost_date_time -lboost_filesystem -lboost_program_options -lssl -lcrypto -lz -lthr -lpthread
c++ -o x25519.o -c -Wall -std=c++11 -Wno-misleading-indentation -g -Ii2pd/libi2pd -Ii2pd/libi2pd_client -I/usr/local/include x25519.cpp
x25519.cpp:61:20: error: variable-sized object may not be initialized
    char b64Public[len_out] = {0};
                   ^~~~~~~
x25519.cpp:62:21: error: variable-sized object may not be initialized
    char b64Private[len_out] = {0};
                    ^~~~~~~
2 errors generated.
gmake: *** [Makefile:92: x25519.o] Error 1
# openssl version
OpenSSL 1.1.1j-freebsd  16 Feb 2021
# /usr/bin/c++ -v
FreeBSD clang version 10.0.1 (git@github.com:llvm/llvm-project.git llvmorg-10.0.1-0-gef32c611aa2)
Target: x86_64-unknown-freebsd12.2
Thread model: posix
InstalledDir: /usr/bin
majestrate commented 3 years ago

gmake