Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Midnight Commander fails to build - Tiger PPC #500

Closed
oboroc opened this issue Apr 30, 2017 · 13 comments · Fixed by #851
Closed

Midnight Commander fails to build - Tiger PPC #500

oboroc opened this issue Apr 30, 2017 · 13 comments · Fixed by #851

Comments

@oboroc
Copy link

oboroc commented Apr 30, 2017

I did a fresh reinstall of Mac OS X Tiger 10.4.11 and Xcode 2.5. I then installed tigerbrew and per brew doctor advise, installed curl and git: brew install curl git. Please note, I didn't install Apple GCC 4.2, since I ran into issues with it earlier while trying to install cmake.

I then tried to install Midnight Commander: brew install mc, but it fails:

/usr/bin/gcc-4.0 -DHAVE_CONFIG_H -I. -I..  -DG_LOG_DOMAIN=\"GLib-GIO\" -I.. -I../glib -I../glib -I.. -I../gmodule -DG_DISABLE_CAST_CHECKS -DGIO_COMPILATION -DGIO_MODULE_DIR=\"/usr/local/lib/gio/modules\"       -I/usr/local/opt/zlib/include -I/usr/local/opt/gettext/include -F/usr/local/Frameworks -D_REENTRANT -Wall -Wstrict-prototypes -Os -w -pipe -mcpu=970 -faltivec -mmacosx-version-min=10.4 -c -o glib-compile-resources.o glib-compile-resources.c
/bin/sh ../libtool  --tag=CC   --mode=link /usr/bin/gcc-4.0 -Wall -Wstrict-prototypes -Os -w -pipe -mcpu=970 -faltivec -mmacosx-version-min=10.4  -L/usr/local/opt/zlib/lib -L/usr/local/opt/gettext/lib -L/usr/local/lib -F/usr/local/Frameworks -Wl,-headerpad_max_install_names -Wl,-framework,Carbon -Wl,-framework,Foundation -o glib-compile-resources gvdb-builder.o glib-compile-resources.o libgio-2.0.la ../gobject/libgobject-2.0.la ../gmodule/libgmodule-2.0.la ../glib/libglib-2.0.la  -lintl  
libtool: link: /usr/bin/gcc-4.0 -Wall -Wstrict-prototypes -Os -w -pipe -mcpu=970 -faltivec -mmacosx-version-min=10.4 -F/usr/local/Frameworks -Wl,-headerpad_max_install_names -Wl,-framework -Wl,Carbon -Wl,-framework -Wl,Foundation -o .libs/glib-compile-resources gvdb-builder.o glib-compile-resources.o  -L/usr/local/opt/zlib/lib -L/usr/local/opt/gettext/lib -L/usr/local/lib ./.libs/libgio-2.0.dylib -L/usr/local/Cellar/pcre/8.39/lib -L/usr/local/Cellar/libffi/3.0.13/lib -L/usr/local/Cellar/zlib/1.2.11/lib /private/tmp/glib20170429-4323-7rqhd4/glib-2.50.1/gobject/.libs/libgobject-2.0.dylib /private/tmp/glib20170429-4323-7rqhd4/glib-2.50.1/gmodule/.libs/libgmodule-2.0.dylib -lz -lresolv ../gobject/.libs/libgobject-2.0.dylib -lffi ../gmodule/.libs/libgmodule-2.0.dylib /private/tmp/glib20170429-4323-7rqhd4/glib-2.50.1/glib/.libs/libglib-2.0.dylib ../glib/.libs/libglib-2.0.dylib /usr/lib/libiconv.dylib -lpcre -lintl
/usr/libexec/gcc/powerpc-apple-darwin8/4.0.1/ld: Undefined symbols:
_deflateSetHeader
_inflateGetHeader
collect2: ld returned 1 exit status
make[4]: *** [glib-compile-resources] Error 1
make[3]: *** [all-recursive] Error 1
make[2]: *** [all] Error 2
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
Error: No such file or directory - /usr/sbin/pkgutil

I ran which ld, and there is an ld already available. I assume it's from Xcode 2.5. Please help.

@mistydemeo
Copy link
Owner

Those are zlib functions. I'm guessing the zlib shipped in Tiger is too old; I'll look at getting midnight_commander to use a newer version.

@oboroc
Copy link
Author

oboroc commented May 1, 2017

@mistydemeo I looked for any projects that have zlib as prerequisite, but didn't find any. I was looking in tigerbrew/Library/Formula for files with :zlib, as in depends_on :zlib.

Does it mean it should be compiled with apple-gcc42?

Update: no, installing apple-gcc42 doesn't do anything for midnight-commander.

@mistydemeo
Copy link
Owner

I can't repro. It looks like what failed might have been glib - can you provide the full logs, please? I'll dig in more!

@oboroc
Copy link
Author

oboroc commented May 2, 2017

Thank you for digging into it!

I looked under ~/Library/Logs/Homebrew, but didn't find any logs for mc or midnight-commander:

adrian-oborocs-imac-g5:~/Library/Logs/Homebrew oboroc$ ls
cmake           gdbm            git             gnu-tar         makedepend      pcre            python          sqlite
curl            gettext         glib            libffi          openssl         pkg-config      readline        zlib

I did find glib logs: glib-log.tar.gz

I decided to run brew install midnight-commander 2>&1 | tee ~/mc-install.log. This generates a sort of log: mc-install.log.gz

I'm not sure if it plays any role, but it's regular Tiger 10.4.11 PPC, installed from restore DVDs that came with my iMac G5 (Tiger 11.4.0). Xcode 2.5 is a download from Apple Developers downlods.

I will try to install it on my Mac Mini G4, and then on my VM with Intel Tiger Server 10.4.11 and report here.

@oboroc
Copy link
Author

oboroc commented May 2, 2017

quick update: I left brew install mc overnight on fresh install of Tiger Server 10.4.11 on Mac Mini G4 and build failed the same way it did on iMac G5. I will add logs once I'm home.

@oboroc
Copy link
Author

oboroc commented May 3, 2017

Well, things are really weird now. I can't even get the initial brew install curl to work. Tested on Intel Tiger VM, PPC Tiger Server on Mac Mini G4 and PPC Leopard on iMac G5.

Update: I opened a separate issue for failing brew install curl: #506

@oboroc
Copy link
Author

oboroc commented May 3, 2017

After working around #506, I still can't build Midnight Commander, but now for a different reason:

$ brew install mc
==> Downloading http://ftp.midnight-commander.org/mc-4.8.14.tar.xz
Already downloaded: /Library/Caches/Homebrew/midnight-commander-4.8.14.tar.xz
==> ./configure --disable-silent-rules --prefix=/usr/local/Cellar/midnight-comma
Last 15 lines from /Users/oboroc/Library/Logs/Homebrew/midnight-commander/01.configure:
checking for GNU gettext in libc... no
checking for GNU gettext in libintl... yes
checking whether to use NLS... yes
checking where the gettext function comes from... external libintl
checking how to link with libintl... -lintl -Wl,-framework -Wl,CoreFoundation
checking for AIX defines... no
configure: using internal editor
configure: using diff viewer
checking for subshell support... yes
configure: Enabling VFS code
checking for zip... /usr/bin/zip
checking for unzip... /usr/bin/unzip
checking for zipinfo code in unzip... yes
checking for LIBSSH... no
configure: error: libssh2 >= 1.2.5 library not found

@oboroc
Copy link
Author

oboroc commented May 3, 2017

I just checked, libssh2 is there, so not sure why ./configure didn't detect it:

$ brew search libssh2
libssh2 (installed)

@miniupnp
Copy link
Contributor

miniupnp commented Jun 6, 2017

@oboroc see #375 the libssh2.pc file should be patched

@oboroc
Copy link
Author

oboroc commented Jul 7, 2017

@mistydemeo I checked on x86 Tiger Server, and it builds fine on it.

@oboroc
Copy link
Author

oboroc commented Jul 7, 2017

@miniupnp I tried your recommendation from #375. Removing zlib from /usr/local/Cellar/libssh2/1.8.0/lib/pkgconfig/libssh2.pc made Midnight Commander build successfully. Thank you! How can this be fixed for good?

@jacobwod
Copy link

@miniupnp Thanks for the tip on removing reference to zlib in /usr/local/Cellar/libssh2/1.8.0/lib/pkgconfig/libssh2.pc. I can confirm that MC builds fine now on 10.5.8 running on a PPC G4.

@WangElectronics
Copy link

I solved it by running this command.

brew install apple-gcc42

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants