freetdi / tdlib

Other
12 stars 5 forks source link

Compilation fails on OpenBSD 6.3 #26

Closed spth closed 3 months ago

spth commented 6 years ago

clog.gz mlog.gz

Using current the current develop branch, invoking compilation via:

./configure CXX=clang++ CXXFLAGS="-I /usr/local/include" > clog 2>&1 notebook3$ gmake > mlog 2>&1

Fails.

spth commented 6 years ago

I just tried current develop on OpenBSB 6.3 on amd64.

./configure CPPFLAGS=-I/usr/local/include

fails:

checking boost/tuple/tuple.hpp usability... no
checking boost/tuple/tuple.hpp presence... yes
configure: WARNING: boost/tuple/tuple.hpp: present but cannot be compiled
configure: WARNING: boost/tuple/tuple.hpp:     check for missing prerequisite headers?
configure: WARNING: boost/tuple/tuple.hpp: see the Autoconf documentation
configure: WARNING: boost/tuple/tuple.hpp:     section "Present But Cannot Be Compiled"
configure: WARNING: boost/tuple/tuple.hpp: proceeding with the compiler's result
configure: WARNING:     ## fffffffffffffffffffffffffffffffffffffffffff ##
configure: WARNING:     ## Report this to larisch.larisch@kaust.edu.sa ##
configure: WARNING:     ## fffffffffffffffffffffffffffffffffffffffffff ##
checking for boost/tuple/tuple.hpp... no
configure: error: could not find a boost header

But the file is there:

notebook3$ ls /usr/local/include/boost/tuple/                                          
detail               tuple.hpp            tuple_comparison.hpp tuple_io.hpp

Philipp

felix-salfelder commented 6 years ago

On Sat, Sep 15, 2018 at 08:42:58AM -0700, Philipp Klaus Krause wrote:

configure: WARNING: boost/tuple/tuple.hpp: present but cannot be compiled [..] configure: error: could not find a boost header

maybe the compiler does not like boost? what combination is it?

there should also be a config.log with more details. typically, autotools compiles/links a dummy executable that includes the header and not much else. if that doesn't work, you get the error above...

spth commented 6 years ago

The system has boost 1.66 and LLVM 5.0.1. SDCC, which also uses boost, configures and compiles on the same system (using its Thorup instead of treedec).

Philipp

spth commented 6 years ago

I found the issue by looking at config.log: Somehow configure had picked up gcc instead of clang, and passed it an option that exists in clang, but not gcc. When explicitly specifying clang, configure works on OpenBSD 6.3 on amd64.

spth commented 6 years ago

The option passed was -std=c++11. The installed gcc does not support it. I'd have preferred a more informative error message (e.g. something telling me that the compiler does not support C++ 11 or so) instead of the rather obscure error on tuple/tuple.hpp.

Philipp

spth commented 6 years ago

For reference: ./configure passed with this command line on OpenBSD 6.3 on amd64:

./configure CC=clang CXX=clang CPP=clang-cpp CPPFLAGS=-I/usr/local/include

Philipp

spth commented 6 years ago

However, gmake then fails (see attached output file mlog-without-gala.txt ). This was without gala installed; I didn't try with gala yet.

Philipp

spth commented 6 years ago

I now have tested treedec on one more OpenBSD 6.3 system, this time using GCC 4.9.4 on ppc. I did not install gala. Since cython is not available there, I configured treedec without python support. On "make check", there is one XFAIL: bucket_sorter_2u. I am currently compiling current SDCC with treedec support on that system, and will report if it works later.

Philipp

felix-salfelder commented 6 years ago

On Sun, Sep 16, 2018 at 04:11:15AM -0700, Philipp Klaus Krause wrote:

On "make check", there is one XFAIL: bucket_sorter_2u.

this is a bug in boost/graph. "XFAIL" just means "expected failure". will remove it, since now all of this is reported upstream [1]. note that we ship a modified boost header..

I am currently compiling current SDCC with treedec support on that system, and will report if it works later.

thanks!

[1] https://github.com/boostorg/graph/pull/86

felix-salfelder commented 6 years ago

On Sun, Sep 16, 2018 at 01:06:49AM -0700, Philipp Klaus Krause wrote:

The option passed was -std=c++11. The installed gcc does not support it. I'd have preferred a more informative error message (e.g. something telling me that the compiler does not support C++ 11 or so) instead of the rather obscure error on tuple/tuple.hpp.

generally, compilation can fail in many ways, so implementing messages for all modes will be difficult. i have simply never tried to do this. right now, configure is meant to only catch/report issues up front...

i will mention c++11 in README. maybe we should use https://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx_11.html, (iirc, the check in question was added when we did not yet require c++11).

spth commented 6 years ago

OK, so SDCC with treedec works fine on the PowerPC OpenBSD 6.3 system with GCC 4.9.4.

But we still have the problem on the amd64 OpenBSD 6.3 system with LLVM 5.0.1.

Philipp

felix-salfelder commented 3 months ago

afair, this has been dealt with. please reopen if not.