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

Fail to install glib on 10.4.11 #594

Closed
edevaldo opened this issue Jun 4, 2018 · 12 comments
Closed

Fail to install glib on 10.4.11 #594

edevaldo opened this issue Jun 4, 2018 · 12 comments

Comments

@edevaldo
Copy link

edevaldo commented Jun 4, 2018

This is a fresh install of tigerbrew with just a few packages installed, gsl, curl and the pre-requisites for glib. It fails in a fashion similar to issue #500, I believe. The logs are attached, I added .txt to some of them to upload.

Tks.

02.make.txt
01.configure.txt
config.log

Last 15 lines from /Users/edevaldo/Library/Logs/Homebrew/glib/02.make:
/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[4]: *** Waiting for unfinished jobs....
libtool: link: /usr/bin/gcc-4.0 -Wall -Wstrict-prototypes -Os -w -pipe -mcpu=7450 -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/gsettings gsettings-tool.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/glib20180603-18795-18z0sgc/glib-2.50.1/gobject/.libs/libgobject-2.0.dylib /private/tmp/glib20180603-18795-18z0sgc/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/glib20180603-18795-18z0sgc/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:
_inflateGetHeader
collect2: ld returned 1 exit status
make[4]: *** [gsettings] 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

@mistydemeo
Copy link
Owner

Hm, that's interesting. It passed -L/usr/local/Cellar/zlib/1.2.11/lib -lz, but doesn't seem to have found Tigerbrew's zlib...

@jarcane
Copy link

jarcane commented May 19, 2019

Yep. I ran into the same issue while trying to build Cairo. :(

Gist of the output: https://gist.github.com/jarcane/8531f6cc5659616a7cae88ee83aba238

Does anyone know if the same issue occurs on Leopard?

@chapmajs
Copy link

Getting a very similar error:

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/glib20191028-24140-18u539k/glib-2.50.1/gobject/.libs/libgobject-2.0.dylib /private/tmp/glib20191028-24140-18u539k/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/glib20191028-24140-18u539k/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

@lyons88
Copy link

lyons88 commented Mar 4, 2020

Error: No such file or directory - /usr/sbin/pkgutil

Install XCode 2.5.

@chapmajs
Copy link

chapmajs commented Apr 1, 2020

I have XCode 2.5 installed, it has been installed from the beginning.

@programmingkidx
Copy link

Glib failed to install on my Mac OS 10.4.11 (x86) system. Here is the output:

Making all in tests
make[2]: Entering directory '/private/tmp/glib20200416-27642-7mbtbu/glib-2.50.1/tests'
make all-recursive
make[3]: Entering directory '/private/tmp/glib20200416-27642-7mbtbu/glib-2.50.1/tests'
Making all in gobject
make[4]: Entering directory '/private/tmp/glib20200416-27642-7mbtbu/glib-2.50.1/tests/gobject'
../../gobject/glib-genmarshal --prefix=test_marshal ./testmarshal.list --header >> xgen-gmh
&& (cmp -s xgen-gmh testmarshal.h 2>/dev/null || cp xgen-gmh testmarshal.h)
&& rm -f xgen-gmh xgen-gmh~
&& echo timestamp > stamp-testmarshal.h
make[4]: *** [Makefile:1749: stamp-testmarshal.h] Error 138
make[4]: Leaving directory '/private/tmp/glib20200416-27642-7mbtbu/glib-2.50.1/tests/gobject'
make[3]: *** [Makefile:1643: all-recursive] Error 1
make[3]: Leaving directory '/private/tmp/glib20200416-27642-7mbtbu/glib-2.50.1/tests'
make[2]: *** [Makefile:1146: all] Error 2
make[2]: Leaving directory '/private/tmp/glib20200416-27642-7mbtbu/glib-2.50.1/tests'
make[1]: *** [Makefile:1213: all-recursive] Error 1
make[1]: Leaving directory '/private/tmp/glib20200416-27642-7mbtbu/glib-2.50.1'
make: *** [Makefile:855: all] Error 2
==> Formula
Path: /usr/local/Library/Formula/glib.rb
==> Configuration
HOMEBREW_VERSION: 0.9.5
ORIGIN: https://github.com/mistydemeo/tigerbrew.git
HEAD: e578981
Last commit: 5 days ago
HOMEBREW_PREFIX: /usr/local
HOMEBREW_REPOSITORY: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
HOMEBREW_BOTTLE_DOMAIN: https://ia902307.us.archive.org/31/items/tigerbrew
CPU: quad-core 32-bit dunno
OS X: 10.4.11-i386
Curl: /usr/local/Library/Homebrew/vendor/portable-curl/current/bin/curl
Xcode: 2.5
CLT: N/A
GCC-4.0: build 5370
GCC-4.2: build 5553
Clang: N/A
X11: 1.1.3 => /usr/X11R6
System Ruby: 2.3.3-222 => /usr/local/Library/Homebrew/vendor/portable-ruby/2.3.3/bin/ruby
Perl: /usr/bin/perl
Python: /usr/local/Cellar/python/2.7.15/bin/python => /usr/local/Cellar/python/2.7.15/Frameworks/Python.framework/Versions/2.7/bin/python2.7
Ruby: /usr/bin/ruby => /Users/admin/Desktop/gawk-5.0.1
Java: N/A
==> ENV
CC: /usr/local/bin/gcc-4.2 => /usr/local/Cellar/apple-gcc42/4.2.1-5553/bin/gcc-4.2
CXX: /usr/local/bin/g++-4.2 => /usr/local/Cellar/apple-gcc42/4.2.1-5553/bin/g++-4.2
OBJC: /usr/local/bin/gcc-4.2
OBJCXX: /usr/local/bin/g++-4.2
CFLAGS: -Os -w -pipe -march=prescott -mmacosx-version-min=10.4
CXXFLAGS: -Os -w -pipe -march=prescott -mmacosx-version-min=10.4
CPPFLAGS: -I/usr/local/opt/zlib/include -I/usr/local/opt/gettext/include -F/usr/local/Frameworks
LDFLAGS: -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
MAKEFLAGS: -j4
CMAKE_PREFIX_PATH: /usr/local/opt/zlib:/usr/local/opt/gettext
CMAKE_FRAMEWORK_PATH: /usr/local/Frameworks
MACOSX_DEPLOYMENT_TARGET: 10.4
PKG_CONFIG_PATH: /usr/local/opt/zlib/lib/pkgconfig
PKG_CONFIG_LIBDIR: /usr/local/lib/pkgconfig:/usr/local/Library/ENV/pkgconfig/10.4:/usr/lib/pkgconfig
ACLOCAL_PATH: /usr/local/opt/gettext/share/aclocal
PATH: /usr/local/opt/gettext/bin:/usr/local/opt/python/bin:/opt/local/bin:/usr/local/cellar/make/4.2.1/bin:/usr/local/Cellar/python/2.7.15/bin/:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/Library/Taps/caskroom/homebrew-cask/cmd:/usr/local/Library/ENV/scm
CPATH: /usr/local/include

@vbvr
Copy link

vbvr commented Aug 23, 2020

I also encountered the same exact error as the OP, on a PowerMac G4 AGP running 10.4.11. I discovered that it is due to how the default Apple GCC4.0 was compiling zlib. It would raise a warning during the ./configure stage and create a static library instead of a shared one. The shared library has those symbols from the glib error.

The solution that worked for me was to brew rm zlib, then to brew install --cc=gcc-7 zlib. Installing glib worked fine after that. GCC 7.3.0 is available on Tigerbrew with brew install gcc.

@chapmajs
Copy link

I'll give that a go this week!

@chapmajs
Copy link

OK, took a month to get to it :) But I'm getting the same errors after installing GCC 7.3.0 via Tigerbrew. Not sure what start Tigerbrew is in at the moment, perhaps I ought to remove and start over.

Is there a way to set the default CC for Tigerbrew and just brew everything under GCC 7.3.0?

@akemin-dayo
Copy link
Contributor

akemin-dayo commented Oct 12, 2021

I can confirm that there are two methods to successfully install glib on OS X 10.4.11 (PowerPC, but this probably applies to x86 as well).

The first, simpler method involves using gcc-4.2 (in Tigerbrew package apple-gcc42):

brew install apple-gcc42
brew remove zlib
brew install glib

The second method involves using gcc-7 (in Tigerbrew package gcc), using the --cc= flag:

brew install gcc
brew remove zlib
brew install --cc=gcc-7 zlib
brew install glib

@chapmajs Try using either of the methods above and see if you can get glib to successfully build.


I think this issue can be resolved directly in the zlib formula by specifying apple-gcc42 as a Tiger-specific dependency.

The --cc= flag is not required when using apple-gcc42, as zlib automatically finds and uses it. This is in contrast to its behaviour with gcc-7, where you need to manually specify the --cc= flag in order for it to be found and used.

If I have some free time in the future, I may submit a PR that fixes this issue.

@chapmajs
Copy link

Hey, that seems to have done it! Currently building some stuff that needs glib to verify.

Thanks a million!

@chapmajs
Copy link

Good to go! I was able to build the applications that were failing before.

Thanks again to everyone involved.

akemin-dayo added a commit to akemin-dayo/tigerbrew that referenced this issue Oct 20, 2021
Building zlib with GCC 4.0 results in a static library instead of a shared library, which can cause formulae that depend on zlib (such as glib in issue mistydemeo#594) to fail to build.
akemin-dayo added a commit to akemin-dayo/tigerbrew that referenced this issue Dec 29, 2022
* zlib-block-gcc-4.0:
  zlib: Require building with GCC 4.2 or higher. Fixes mistydemeo#594.
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

No branches or pull requests

8 participants