Ticket #32185 (closed defect: fixed)
glib2, glib2-devel: build fails when pkgconfig is not installed
| Reported by: | jerkejacobs@… | Owned by: | ryandesign@… |
|---|---|---|---|
| Priority: | Normal | Milestone: | |
| Component: | ports | Version: | 2.0.3 |
| Keywords: | Cc: | nhoj.patrick@…, fx.payet@…, xdamman@…, pauljamesadams@…, piotr.kontek@…, obensonne@…, j_mach_wust@…, thilo.haas@…, igor.v.karp@…, lists.pascal.juergens@…, tim@…, pike.jon@…, kesmarky.attila@…, brazilbrown@…, vincent.liegeois@…, ryan.txanson@…, mauritz.lovgren@…, andrew.giessel@…, dexterbt1@…, bonoba@…, mike@…, mk@…, steven.westmoreland@…, elatllat@…, philcuddy@…, youhei@…, dports@… | |
| Port: | glib2, glib2-devel |
Description
Dear all:
The glib2-devel (glib-2.29.92) port fails on autoconf/automake macro:
:info:build configure.ac:84: error: possibly undefined macro: AC_DEFINE
:info:build If this token and others are legitimate, please use m4_pattern_allow.
:info:build See the Autoconf documentation.
:info:build make: *** [configure] Error 1
:info:build make: *** Waiting for unfinished jobs....
:info:build gtk-doc.make:32: EXTRA_DIST multiply defined in condition TRUE ...
:info:build docs/reference/gio/Makefile.am:132: `gtk-doc.make' included from here
:info:build Makefile.decl:8: ... `EXTRA_DIST' previously defined here
:info:build docs/reference/gio/Makefile.am:1: `Makefile.decl' included from here
:info:build gtk-doc.make:32: EXTRA_DIST multiply defined in condition TRUE ...
:info:build docs/reference/gio/gdbus-object-manager-example/Makefile.am:54: `gtk-doc.make' included from here
:info:build Makefile.decl:8: ... `EXTRA_DIST' previously defined here
:info:build docs/reference/gio/gdbus-object-manager-example/Makefile.am:1: `Makefile.decl' included from here
:info:build gtk-doc.make:32: EXTRA_DIST multiply defined in condition TRUE ...
:info:build docs/reference/glib/Makefile.am:77: `gtk-doc.make' included from here
:info:build Makefile.decl:8: ... `EXTRA_DIST' previously defined here
:info:build docs/reference/glib/Makefile.am:2: `Makefile.decl' included from here
:info:build gtk-doc.make:32: EXTRA_DIST multiply defined in condition TRUE ...
:info:build docs/reference/gobject/Makefile.am:62: `gtk-doc.make' included from here
:info:build Makefile.decl:8: ... `EXTRA_DIST' previously defined here
:info:build docs/reference/gobject/Makefile.am:2: `Makefile.decl' included from here
:info:build make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_glib2-devel/glib2-devel/work/glib-2.29.92'
:info:build shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_glib2-devel/glib2-devel/work/glib-2.29.92" && /usr/bin/make -j2 -w all V=1 " returned error 2
:error:build Target org.macports.build returned: shell command failed (see log for details)
:debug:build Backtrace: shell command failed (see log for details)
while executing
"command_exec build"
(procedure "portbuild::build_main" line 8)
invoked from within
"$procedure $targetname"
:info:build Warning: the following items did not execute (for glib2-devel): org.macports.activate org.macports.build org.macports.destroot org.macports.install
:error:build Failed to install glib2-devel
:debug:build could not read "/opt/local/share/man/man3/ffi_prep_cif.3.gz": no such file or directory
while executing
"file type $file"
:notice:build Log for glib2-devel is at: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_glib2-devel/glib2-devel/main.log
Kernel:
Darwin White.local 11.2.0 Darwin Kernel Version 11.2.0: Tue Aug 9 20:54:00 PDT 2011; root:xnu-1699.24.8~1/RELEASE_X86_64 x86_64
Xcode 4.2 Build 4D199
Attachments
Change History
comment:2 Changed 18 months ago by macsforever2000@…
- Cc jerkejacobs@… removed
- Keywords glib2-devel glib-2.29.92 removed
- Owner changed from macports-tickets@… to ryandesign@…
comment:4 follow-up: ↓ 5 Changed 18 months ago by ryandesign@…
'"xport-dynamic", referenced from: -u command line option' in the configure output looks strange. Can you attach the config.log too please? It's in the directory identified by the command 'port work glib2-devel'.
Does the glib2 port have the same issues for you?
comment:5 in reply to: ↑ 4 Changed 18 months ago by ryandesign@…
- Port changed from glib2-devel to glib2, glib2-devel
- Summary changed from Glib2-devel fails building on configure.ac:84: error: possibly undefined macro: AC_DEFINE to glib2, glib2-devel: error: possibly undefined macro: AC_DEFINE
Replying to ryandesign@…:
Does the glib2 port have the same issues for you?
I updated glib2 to 2.30.2 and the buildbot has the same problem building it that you had with glib2-devel. It builds fine on my system...
comment:6 Changed 18 months ago by jerkejacobs@…
glib-2.30.2 fails on port glib2 with Lion 10.7.2 and Xcode 4.2 i attached the config.log and main.log for this version. I had previously installed a older glib2 version but needed glib2-devel and updated my ports and it fails. I can not trace back wish version of glib2 i had successfully installed.
comment:9 Changed 18 months ago by fx.payet@…
glib2 now apparently needs pkgconfig (it uses AC_DEFINE). But pkgconfig needs glib2, so neither can be installed on a fresh install...
comment:10 Changed 18 months ago by ryandesign@…
Thanks, you're right, I can reproduce the failure when I deactivate pkgconfig.
Obviously we've gone to some lengths already to ensure glib2 doesn't use or need pkgconfig, but that seems to have broken somewhere along the way.
comment:11 Changed 18 months ago by ryandesign@…
- Cc xdamman@…, pauljamesadams@… added
Has duplicate #32201.
comment:18 Changed 18 months ago by lists.pascal.juergens@…
- Cc lists.pascal.juergens@… removed
Cc Me!
comment:30 Changed 18 months ago by andrew.giessel@…
in the meantime, you can install the previous version of glib2 via svn:
svn co -r 79276 http://svn.macports.org/repository/macports/trunk/dports/devel/glib2 cd glib2 sudo port install
seemed to work like a charm for me... gl!
comment:32 Changed 18 months ago by xdamman@…
Yeah works, thanks so much Andrew.
comment:33 follow-up: ↓ 35 Changed 18 months ago by xdamman@…
glib2 install worked great but I still can't install cairo. It looks like it tries to get the latest glib2 :-/ How can I force a previous version? Thanks.
xdamman-mba:storycover xdamman$ sudo port install cairo Password: ---> Computing dependencies for glib2 ---> Building glib2 Error: Target org.macports.build returned: shell command failed (see log for details) Log for glib2 is at: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_glib2/glib2/main.log Error: Unable to upgrade port: 1 Error: Unable to execute port: upgrade glib2 failed To report a bug, see <http://guide.macports.org/#project.tickets>
comment:35 in reply to: ↑ 33 Changed 18 months ago by j_mach_wust@…
Same for pkgconfig: I cannot install pkgconfig. It also looks like it tries to get the latest glib2 -- even though there is still a previous version of glib2 installed on my computer.
comment:36 follow-up: ↓ 38 Changed 18 months ago by bonoba@…
Alright, guys, here is the workaround:
sudo su - cd /opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/devel mv glib2 glib2.bak svn co -r 79276 http://svn.macports.org/repository/macports/trunk/dports/devel/glib2 port install glib2 +universal port install pkgconfig +universal rm -rf glib2 mv glib2.bak glib2 port upgrade glib2
comment:37 Changed 18 months ago by ryandesign@…
- Cc mk@… added
Has duplicate #32212 and a report on the mailing list.
comment:38 in reply to: ↑ 36 Changed 18 months ago by j_mach_wust@…
Thanks a lot for the workaround; it worked like a charm. The only very minor thing I had to change was the following: When in root mode (sudo su -), my system would not recognize the port command. So I replaced port by /opt/local/bin/port and then your workaround worked just fine.
comment:40 Changed 18 months ago by ryandesign@…
- Cc philcuddy@… added
- Summary changed from glib2, glib2-devel: error: possibly undefined macro: AC_DEFINE to glib2, glib2-devel: build fails when pkgconfig is not installed
Has duplicate #32222.
comment:42 Changed 18 months ago by dports@…
- Cc dports@… added
glib2 can build fine without pkgconfig installed, but it needs pkgconfig (or rather, its m4 files) in order to run autoconf.
I think the right solution here is to drop the pkg.m4 file from pkgconfig into ${worksrcpath}/m4macros/
comment:43 Changed 18 months ago by ryandesign@…
Or do you think we could patch configure instead of configure.ac, and thereby no longer need to run autoconf?
comment:44 Changed 18 months ago by dports@…
Sure, that would work too. I didn't look too carefully at what we were patching in configure.ac or how hard it would be to do that.
comment:45 Changed 18 months ago by ryandesign@…
Seems to work. Fixed glib2 in r87503. glib2-devel still to come.
comment:46 Changed 18 months ago by pauljamesadams@…
The updated port builds, but I suspect it causes #32227 (don't know for sure).
comment:47 Changed 18 months ago by bonoba@…
I have successfully built gtk-2.24.8 with all dependencies including xorg-libXau mentioned in the ticket #32227
However there is another problem with this glib version -- I am having troubles compiling gconf against it, the log reveals that an include file from pango uses the symbol G_CONST_RETURN which has been removed in this glib:
:info:build /opt/local/include/pango-1.0/pango/pango-script.h:132: error: expected declaration specifiers or ‘...’ before ‘G_CONST_RETURN’
I tried to manually compile a newer version of pango 1.29.5, but unfortunately it depends on a newer glib-2.31+ So I really don't know where to move from here. I guess the safe option would be to downgrade to the previous glib version.
comment:48 Changed 18 months ago by bonoba@…
UPDATE
Okay, here is a good description of the problem with glib-2.30.2 + pango-1.28.x: http://forums.gentoo.org/viewtopic-t-896464-start-0.html
I have managed to compile gconf and other packages by slightly changing the file
/opt/local/include/glib-2.0/glib/gmacros.h
like this:
--- glib/gmacros.h.orig 2011-11-24 13:40:01.000000000 +0200 +++ glib/gmacros.h 2011-11-24 13:40:16.000000000 +0200 @@ -254,13 +254,11 @@ #endif /* Deprecated -- do not use. */ -#ifndef G_DISABLE_DEPRECATED #ifdef G_DISABLE_CONST_RETURNS #define G_CONST_RETURN #else #define G_CONST_RETURN const #endif -#endif /* * The G_LIKELY and G_UNLIKELY macros let the programmer give hints to
Of course it's not a right solution, instead I should have made a patch for the glib or pango package, but I needed a result fast (compiling wine-devel now), and it did the trick.
comment:49 Changed 18 months ago by ryandesign@…
- Status changed from new to closed
- Resolution set to fixed
This ticket is about glib2/glib2-devel failing to build when pkgconfig is not installed. Other problems should be discussed in other tickets.
Fixed glib2-devel in r87538.
comment:50 Changed 18 months ago by ryandesign@…
Has duplicate #32239.
comment:51 Changed 18 months ago by ryandesign@…
Has duplicate #32263.
comment:52 Changed 18 months ago by ryandesign@…
Has duplicate #32283.


Cc Me!