macosforge / darwinbuild

Darwinbuild is a collection of tools that assist compilation of the many projects contained in Darwin, the open source base of Apple's macOS operating system.
https://macosforge.github.io/darwinbuild/
Other
128 stars 54 forks source link

OpenSSH fails to build #113

Open macosforgebot opened 14 years ago

macosforgebot commented 14 years ago

sigmaris@… originally submitted this as ticket:115


OpenSSH fails when compiling, using darwinbuild from SVN. It seems to stop in the configuring stage due to a broken C compiler:

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Build log begins here:

TargetConfig: MacOSX if [ ! -f "/SourceCache/OpenSSH/OpenSSH-142/Makefile" ]; then make install_source; fi Configuring openssh... /bin/mkdir -p -m 0755 /private/var/tmp/OpenSSH/OpenSSH-142.obj cd /private/var/tmp/OpenSSH/OpenSSH-142.obj && CC="/usr/bin/llvm-gcc-4.2" CFLAGS="-arch i386 -arch x86_64 -g -Os -pipe -fPIE -D_FORTIFY_SOURCE=2" CCFLAGS="-arch i386 -arch x86_64 -g -Os -pipe " CXXFLAGS="-arch i386 -arch x86_64 -g -Os -pipe " LDFLAGS="-arch i386 -arch x86_64 -L. -Lopenbsd-compat -Wl,-pie -framework CoreFoundation -framework OpenDirectory -lresolv" TEXI2HTML="/usr/bin/texi2html -subdir ." LD_TRACE_FILE=/dev/null /SourceCache/OpenSSH/OpenSSH-142/openssh/configure --prefix="/usr" --mandir="/usr/share/man" --infodir="/usr/share/info" --disable-dependency-tracking --sysconfdir="/etc" --disable-suid-ssh --with-ssl-dir=/usr/include/openssl --with-random=/dev/urandom --with-tcp-wrappers --with-pam --with-kerberos5 --without-zlib-version-check --with-4in6 --with-audit=bsm CPPFLAGS="-DAPPLE_SACL -D_UTMPX_COMPAT -DAPPLE_UTMPX -DUSE_CCAPI -DAPPLE_LAUNCHD -DAPPLE_MEMBERSHIP -DAPPLE_SANDBOX_PRIVSEP_CHILDREN -DAPPLE_CROSS_REALM -DAPPLE_XSAN" --with-keychain=apple --disable-libutil --disable-utmp --disable-wtmp --with-privsep-user=_sshd checking for gcc... /usr/bin/llvm-gcc-4.2 checking for C compiler default output file name... configure: error: C compiler cannot create executables See `config.log' for more details. make: * private/var/tmp/OpenSSH/OpenSSH-142.obj/configure-stamp Error 77 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

BUILD TIME: 0h 0m 1s

EXIT STATUS: 2

I have attached the full build log and config.log to this ticket.

macosforgebot commented 14 years ago

sigmaris@… originally submitted this as attachment:fullbuildlog.txt:⁠ticket:115


Build log

macosforgebot commented 14 years ago

sigmaris@… originally submitted this as attachment:config.log:⁠ticket:115


Config.log from failed build

macosforgebot commented 14 years ago

sigmaris@… originally submitted this as comment:1:⁠ticket:115


It looks like the Makefile for OpenSSH explicitly sets the compiler to /usr/bin/llvm-gcc-4.2 which is present neither in the BuildRoot nor the host filesystem, thus configure fails. Since I was aiming eventually to build OpenSSH to use on the host system, i.e. to replace the copy distributed with OS X 10.6.2, I extracted the source and modified the Makefile to set CC="/usr/bin/gcc-4.2", then tried using

darwinbuild -nochroot OpenSSH

This passes the compiler checks but eventually fails during configure due to mismatched OpenSSL library/header versions:

checking whether getpgrp requires zero arguments... yes
checking OpenSSL header version... 9080bf (OpenSSL 0.9.8k 25 Mar 2009)
checking OpenSSL library version... 9080cf (OpenSSL 0.9.8l 5 Nov 2009)
checking whether OpenSSL's headers match the library... no
configure: error: Your OpenSSL headers do not match your
library. Check config.log for details.
If you are sure your installation is consistent, you can disable the check
by running "./configure --without-openssl-header-check".
Also see contrib/findssl.sh for help identifying header/library mismatches.

make: *** [/Users/hugh/10C540/BuildRoot/private/var/tmp/OpenSSH/OpenSSH-142.obj/configure-stamp] Error 1
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 BUILD TIME: 0h 0m 30s
EXIT STATUS: 2

Next step is to try and identify which OpenSSL headers it is picking up; I suspect that due to the -nochroot flag it may be looking at versions installed by MacPorts.