Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#32203 closed defect (fixed)

atk @1.32.0 Build failure: unknown type name 'G_CONST_RETURN'27

Reported by: fx.payet@… Owned by: singingwolfboy@…
Priority: Normal Milestone:
Component: ports Version: 2.0.3
Keywords: haspatch Cc: ryandesign (Ryan Carsten Schmidt), bernhard.fisseni@…, nonstop.server@…, bonoba@…, anddam (Andrea D'Amore), tanner@…, bjorn@…, ocroquette (Olivier Croquette), brian@…, drkp (Dan Ports), gardnermj@…, ariane@…, k.polezhaiev@…, chuckinator0@…, kenyon@…, andrew.giessel@…
Port: atk

Description (last modified by ryandesign (Ryan Carsten Schmidt))

Hello,

when trying to build atk, I've got the following error :

:info:build :unknown type name 'G_CONST_RETURN'21

Attachments (3)

main.log (40.9 KB) - added by fx.payet@… 13 years ago.
main.log
Portfile (1.5 KB) - added by bonoba@… 13 years ago.
a Portfile for atk-2.2.0
patch-atk_port.diff (898 bytes) - added by anddam (Andrea D'Amore) 13 years ago.
port patch from bonoba's Portfile

Download all attachments as: .zip

Change History (39)

Changed 13 years ago by fx.payet@…

Attachment: main.log added

main.log

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

Cc: ryandesign@… added; singingwolfboy removed
Description: modified (diff)
Owner: changed from macports-tickets@… to singingwolfboy@…
Summary: atk @1.32.0 Build failureatk @1.32.0 Build failure: unknown type name 'G_CONST_RETURN'27

Possibly related to the glib2 2.30.x update I just did?

Perhaps atk needs to be updated; current version is 2.2.0.

BTW the Cc field must contain complete email addresses.

comment:2 in reply to:  1 ; Changed 13 years ago by fx.payet@…

Replying to ryandesign@…:

Possibly related to the glib2 2.30.x update I just did?

Perhaps atk needs to be updated; current version is 2.2.0.

BTW the Cc field must contain complete email addresses.

Sorry for the CC and the bad formatting of my message.

You're right, it has to do with glib2. Here's what I've done :

  • download the previous version of the port for glib2, and install this one
  • install pkgconfig
  • upgrade glib2

At this point atk wasn't compiling. Then I did the following :

  • deinstalled glib2 2.30 (and pkgconfig which was dependant on it)

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

Sorry, my previous message was cut.

So after uninstalling glib2 2.30, I reactivated 2.28, installed pkgconfig and then atk built just fine

comment:4 Changed 13 years ago by bernhard.fisseni@…

Cc: bernhard.fisseni@… added

Cc Me!

comment:5 Changed 13 years ago by nonstop.server@…

Cc: nonstop.server@… added

Cc Me!

comment:6 Changed 13 years ago by bonoba@…

Cc: bonoba@… added

Cc Me!

Changed 13 years ago by bonoba@…

Attachment: Portfile added

a Portfile for atk-2.2.0

comment:7 Changed 13 years ago by bonoba@…

I have changed a few lines in the Prortfile for atk-1.32 to produce a Portfile for the newest atk-2.2.0 Attaching the file.

It installs well, although I don't know how good will it play with other packages.

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

Well it would be important to test a couple other packages to see how they react to it.

Does the library version change?

comment:9 Changed 13 years ago by bonoba@…

Update:

the version of the lib does not change, it seems:

# ls -l /opt/local/lib/libatk*
-rwxr-xr-x  1 root  admin  296184 24 ноя 10:49 /opt/local/lib/libatk-1.0.0.dylib
-rw-r--r--  1 root  admin  459456 24 ноя 10:49 /opt/local/lib/libatk-1.0.a
lrwxr-xr-x  1 root  admin      18 24 ноя 10:49 /opt/local/lib/libatk-1.0.dylib -> libatk-1.0.0.dylib
-rwxr-xr-x  1 root  admin    1177 24 ноя 10:49 /opt/local/lib/libatk-1.0.la

I have just compiled gtk2-2.24.8 and it appears to work fine (I ran gtk-demo). Note, I'm on Lion 10.7.2, Xcode 4.2 and I had to compile glib2 with llvm-gcc-4.2 because clang produced version threw threading errors.

comment:10 Changed 13 years ago by gardnermj@…

I'm getting similar errors building gconf:

info:build /opt/local/include/pango-1.0/pango/pango-script.h:132: error: expected declaration specifiers or ‘...’ before ‘G_CONST_RETURN’

comment:11 Changed 13 years ago by bonoba@…

See the ticket #32185, I put some findings and workarounds there.

comment:12 Changed 13 years ago by anddam (Andrea D'Amore)

Cc: and.damore@… added

Cc Me!

comment:13 in reply to:  10 Changed 13 years ago by anddam (Andrea D'Amore)

Replying to gardnermj@…:

I'm getting similar errors building gconf:

Please file a new ticket for gconf, this ticket is solved with the updated Portfile attached. Notice that gconf has been kept back for a reason, cf. #28077

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

Cc: tanner@… added

Has duplicate #32203.

comment:15 Changed 13 years ago by bjorn@…

Cc: bjorn@… added

Cc Me!

comment:16 Changed 13 years ago by ocroquette (Olivier Croquette)

Cc: ocroquette@… added

Cc Me!

comment:17 in reply to:  description Changed 13 years ago by ocroquette (Olivier Croquette)

Same problem here, but the following workaround from bonoba@... worked for me:

--- 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

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

Keywords: haspatch added

Wouldn't we rather update atk to the latest version, than introduce a patch to use deprecated functions that the comment right above them says not to use?

bonoba could you please attach a patch of your changes (not a complete portfile)?

Changed 13 years ago by anddam (Andrea D'Amore)

Attachment: patch-atk_port.diff added

port patch from bonoba's Portfile

comment:19 Changed 13 years ago by brian@…

Sorry for the total noob question, but I'm having the same error (Failed to install atk) when attempting to install gtk2. How do I implement this fix you are describing? Thanks.

comment:20 Changed 13 years ago by brian@…

Cc: brian@… added

Cc Me!

comment:21 Changed 13 years ago by bonoba@…

So, Brian, as a temporary fix, you can put the Portfile from this ticket here:

/opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/devel/atk

Then do this:

# port install atk

It should install atk-2.2

Note the updated portfile will be gone next time you update your macports, but that would not matter for you already would have the newer atk installed in the system.

comment:22 in reply to:  21 Changed 13 years ago by brian@…

Replying to bonoba@…:

Thanks so much, that did the trick!

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

Cc: dports@… added

Cc Me!

comment:24 Changed 13 years ago by gardnermj@…

Cc: gardnermj@… added

Cc Me!

comment:25 Changed 13 years ago by ariane@…

Cc: ariane@… added

Cc Me!

comment:26 Changed 13 years ago by blobdobguy@…

Sorry for another noob question, but when will the new Portfile be pushed through port selfupdade?

comment:27 Changed 13 years ago by k.polezhaiev@…

Cc: k.polezhaiev@… added

Cc Me!

comment:28 in reply to:  2 Changed 13 years ago by gomberg@…

I had similar errors installing ATK. Discovered that I had both glib2 @2.28.8_0 and glib2 @2.30.2_1 (active) installed. Tried the modified Portfile from above with no success. So I activated glib2 @2.28.8_0 without removing 2.30.2_1 and ATK installed without error. YMMV but it may save some steps.

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

Cc: chuckinator0@… added

Has duplicate #32234.

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

Has duplicate #32272.

comment:31 in reply to:  18 ; Changed 13 years ago by bonoba@…

Replying to ryandesign@…:

Wouldn't we rather update atk to the latest version, than introduce a patch to use deprecated functions that the comment right above them says not to use?

bonoba could you please attach a patch of your changes (not a complete portfile)?

Ryan, the patch about the deprecated feature in glib is for a different issue: the current pango installs a header file that uses a deprecated symbol (G_CONST_RETURN) which is disabled in the current glib by default. Therefore at least two packages fail to build (poppler and gconf). So the patch tweaks the glib header gmacros.h in order to let those troubled packages build successfully. It is a "nasty hack" by all means and has nothing to do with the Portfile for atk-2.2 in this ticket.

Perhaps somebody should file/find a bug for gconf and/or poppler and put the findings there (I won't).

-- Alexander (bonoba@...)

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

I haven't had any problems with the atk 2.2 upgrade proposed here, so I think we should update the port.

I have run into some other instances of the same G_CONST_RETURN error, including gdk-pixbuf2 (#32264). It looks like there are a few others but I haven't yet gotten to the bottom of what they are.

comment:33 Changed 13 years ago by kenyon@…

Cc: kenyon@… added

Cc Me!

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

Resolution: fixed
Status: newclosed

Update atk to v2.2.0 in r87586.

comment:35 in reply to:  31 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Replying to bonoba@…:

the current pango installs a header file that uses a deprecated symbol (G_CONST_RETURN)

Not since I fixed #32242 it shouldn't.

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

Cc: andrew.giessel@… added

Cc Me!

Note: See TracTickets for help on using tickets.