Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#32185 closed defect (fixed)

glib2, glib2-devel: build fails when pkgconfig is not installed

Reported by: jerkejacobs@… Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version: 2.0.3
Keywords: Cc: nhojpatrick (John Patrick), fx.payet@…, xdamman@…, pauljamesadams@…, piotr.kontek@…, obensonne@…, machsna (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@…, mkae (Marko Käning), steven.westmoreland@…, Dmole (Tim), philcuddy@…, youhei@…, drkp (Dan Ports)
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 (4)

main.log (54.5 KB) - added by jerkejacobs@… 13 years ago.
main.log
config.log (418.2 KB) - added by jerkejacobs@… 13 years ago.
config-glib-2.30.2.log (416.9 KB) - added by jerkejacobs@… 13 years ago.
main-glib2-2.30.2.log (70.8 KB) - added by jerkejacobs@… 13 years ago.

Download all attachments as: .zip

Change History (56)

comment:1 Changed 13 years ago by jerkejacobs@…

Cc: jerkejacobs@… added

Cc Me!

comment:2 Changed 13 years ago by mf2k (Frank Schima)

Cc: jerkejacobs@… removed
Keywords: glib2-devel glib-2.29.92 removed
Owner: changed from macports-tickets@… to ryandesign@…

comment:3 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Please attach the main.log file.

Changed 13 years ago by jerkejacobs@…

Attachment: main.log added

main.log

comment:4 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

'"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 13 years ago by ryandesign (Ryan Carsten Schmidt)

Port: glib2 added
Summary: Glib2-devel fails building on configure.ac:84: error: possibly undefined macro: AC_DEFINEglib2, 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...

Changed 13 years ago by jerkejacobs@…

Attachment: config.log added

comment:6 Changed 13 years 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.

Changed 13 years ago by jerkejacobs@…

Attachment: config-glib-2.30.2.log added

Changed 13 years ago by jerkejacobs@…

Attachment: main-glib2-2.30.2.log added

comment:7 Changed 13 years ago by nhojpatrick (John Patrick)

Cc: nhoj.patrick@… added

Cc Me!

comment:8 Changed 13 years ago by fx.payet@…

Cc: fx.payet@… added

Cc Me!

comment:9 Changed 13 years 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 13 years ago by ryandesign (Ryan Carsten Schmidt)

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 13 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: xdamman@… pauljamesadams@… added

Has duplicate #32201.

comment:12 Changed 13 years ago by lists.pascal.juergens@…

Cc: lists.pascal.juergens@… added

Cc Me!

comment:13 Changed 13 years ago by piotr.kontek@…

Cc: piotr.kontek@… added

Cc Me!

comment:14 Changed 13 years ago by obensonne@…

Cc: obensonne@… added

Cc Me!

comment:15 Changed 13 years ago by machsna (J. ‘mach’ Wust)

Cc: j_mach_wust@… added

Cc Me!

comment:16 Changed 13 years ago by thilo.haas@…

Cc: thilo.haas@… added

Cc Me!

comment:17 Changed 13 years ago by igor.v.karp@…

Cc: igor.v.karp@… added

Cc Me!

comment:18 Changed 13 years ago by lists.pascal.juergens@…

Cc: lists.pascal.juergens@… removed

Cc Me!

comment:19 Changed 13 years ago by lists.pascal.juergens@…

Cc: lists.pascal.juergens@… added

Cc Me!

comment:20 Changed 13 years ago by tim@…

Cc: tim@… added

Cc Me!

comment:21 Changed 13 years ago by pike.jon@…

Cc: pike.jon@… added

Cc Me!

comment:22 Changed 13 years ago by kesmarky.attila@…

Cc: kesmarky.attila@… added

Cc Me!

comment:23 Changed 13 years ago by brazilbrown@…

Cc: brazilbrown@… added

Cc Me!

comment:24 Changed 13 years ago by vincent.liegeois@…

Cc: vincent.liegeois@… added

Cc Me!

comment:25 Changed 13 years ago by ryan.txanson@…

Cc: ryan.txanson@… added

Cc Me!

comment:26 Changed 13 years ago by mauritz.lovgren@…

Cc: mauritz.lovgren@… added

Cc Me!

comment:27 Changed 13 years ago by andrew.giessel@…

Cc: andrew.giessel@… added

Cc Me!

comment:28 Changed 13 years ago by dexterbt1@…

Cc: dexterbt1@… added

Cc Me!

comment:29 Changed 13 years ago by bonoba@…

Cc: bonoba@… added

Cc Me!

comment:30 Changed 13 years 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 13 years ago by xdamman@…

Yeah works, thanks so much Andrew.

comment:33 Changed 13 years 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:34 Changed 13 years ago by mike@…

Cc: mike@… added

Cc Me!

comment:35 in reply to:  33 Changed 13 years ago by machsna (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 Changed 13 years 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 13 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: mk@… added

Has duplicate #32212 and a report on the mailing list.

comment:38 in reply to:  36 Changed 13 years ago by machsna (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:39 Changed 13 years ago by steven.westmoreland@…

Cc: steven.westmoreland@… added

Cc Me!

comment:40 Changed 13 years ago by Dmole (Tim)

Cc: elatllat@… added

Cc Me!

comment:40 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: philcuddy@… added
Summary: glib2, glib2-devel: error: possibly undefined macro: AC_DEFINEglib2, glib2-devel: build fails when pkgconfig is not installed

Has duplicate #32222.

comment:41 Changed 13 years ago by youhei@…

Cc: youhei@… added

Cc Me!

comment:42 Changed 13 years ago by drkp (Dan Ports)

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 13 years ago by ryandesign (Ryan Carsten Schmidt)

Or do you think we could patch configure instead of configure.ac, and thereby no longer need to run autoconf?

comment:44 Changed 13 years ago by drkp (Dan Ports)

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 13 years ago by ryandesign (Ryan Carsten Schmidt)

Seems to work. Fixed glib2 in r87503. glib2-devel still to come.

comment:46 Changed 13 years ago by pauljamesadams@…

The updated port builds, but I suspect it causes #32227 (don't know for sure).

comment:47 Changed 13 years 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 13 years 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 13 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: newclosed

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 13 years ago by ryandesign (Ryan Carsten Schmidt)

Has duplicate #32239.

comment:51 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Has duplicate #32263.

comment:52 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Has duplicate #32283.

Note: See TracTickets for help on using tickets.