#35148 closed defect (fixed)
gegl 0.2.0_0 Syntax error before 'AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER'
Reported by: | jovo@… | Owned by: | nerdling (Jeremy Lavergne) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.1.1 |
Keywords: | tiger leopard | Cc: | dbevans (David B. Evans), jeremyhu (Jeremy Huddleston Sequoia), alexeiz@…, trog24 (Frank J. R. Hanstick), sasoph@…, dershow, mdbecque@…, mklein-de (Michael Klein), cooljeanius (Eric Gallager) |
Port: | gegl |
Description
Running upgrade outdated, the gegl port fails with
:notice:build ---> Building gegl :debug:build Executing org.macports.build (gegl) :debug:build port disallows a parallel build :debug:build Environment: CPATH='/opt/local/include' CC_PRINT_OPTIONS_FILE='/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_graphics_gegl/gegl/work/.CC_PRINT_OPTIONS' LIBRARY_PATH='/opt/local/lib' CC_PRINT_OPTIONS='YES' MACOSX_DEPLOYMENT_TARGET='10.5' :debug:build Assembled command: 'cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_graphics_gegl/gegl/work/gegl-0.2.0" && /usr/bin/make -w all' :debug:build Executing command line: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_graphics_gegl/gegl/work/gegl-0.2.0" && /usr/bin/make -w all :info:build make: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_graphics_gegl/gegl/work/gegl-0.2.0' :info:build /usr/bin/make all-recursive :info:build make[1]: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_graphics_gegl/gegl/work/gegl-0.2.0' :info:build Making all in libs :info:build make[2]: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_graphics_gegl/gegl/work/gegl-0.2.0/libs' :info:build Making all in rgbe :info:build make[3]: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_graphics_gegl/gegl/work/gegl-0.2.0/libs/rgbe' :info:build CC librgbe_la-rgbe.lo :info:build CCLD librgbe.la :info:build make[3]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_graphics_gegl/gegl/work/gegl-0.2.0/libs/rgbe' :info:build make[3]: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_graphics_gegl/gegl/work/gegl-0.2.0/libs' :info:build make[3]: Nothing to be done for `all-am'. :info:build make[3]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_graphics_gegl/gegl/work/gegl-0.2.0/libs' :info:build make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_graphics_gegl/gegl/work/gegl-0.2.0/libs' :info:build Making all in gegl :info:build make[2]: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_graphics_gegl/gegl/work/gegl-0.2.0/gegl' :info:build Making all in buffer :info:build make[3]: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_graphics_gegl/gegl/work/gegl-0.2.0/gegl/buffer' :info:build CC gegl-tile-backend-tiledir.lo :info:build CC gegl-buffer.lo :info:build In file included from ../../gegl/opencl/gegl-cl-types.h:6, :info:build from ../../gegl/opencl/gegl-cl.h:4, :info:build from gegl-buffer-cl-iterator.h:5, :info:build from gegl-buffer-private.h:27, :info:build from gegl-buffer.c:51: :info:build ../../gegl/opencl/cl.h:450: error: syntax error before 'AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER' :info:build ../../gegl/opencl/cl.h:450: warning: type defaults to 'int' in declaration of 'AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER' :info:build ../../gegl/opencl/cl.h:450: warning: data definition has no type or storage class :info:build ../../gegl/opencl/cl.h:457: error: syntax error before 'AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER'
Uninstall en install makes no difference. This is OS X 10.5.8 on Intel iMac. Attached are the logfile and a list of the ports installed.
Attachments (6)
Change History (35)
Changed 12 years ago by jovo@…
Changed 12 years ago by jovo@…
Attachment: | installed.txt added |
---|
comment:1 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)
Cc: | devans removed |
---|---|
Keywords: | tiger leopard added |
Owner: | changed from macports-tickets@… to devans@… |
Port: | gegl added |
comment:2 Changed 12 years ago by jeremyhu (Jeremy Huddleston Sequoia)
Cc: | devans@… jeremyhu@… alexeiz@… trog24@… added |
---|---|
Owner: | changed from devans@… to snc@… |
comment:3 Changed 12 years ago by jovo@…
Trying to find a work-around for this, I guess this is caused by this gegl bug: https://bugzilla.gnome.org/show_bug.cgi?id=673969, Can't wait for the newer gegl version is released.
comment:4 follow-up: 11 Changed 12 years ago by jeremyhu (Jeremy Huddleston Sequoia)
Look at the dyld-headers port for an example on how to fix the issue.
comment:6 Changed 12 years ago by potmj (Michael Pot)
I have the same problem on 10.5.8, Xcode 3.1.4 as dependency trying to install gimp2
comment:7 Changed 12 years ago by jovo@…
Not really a fix but, considering Mountain Lion is now being released, I upgraded to Snow Leopard (10.6.8) and did a full re-install of all ports. On 10.6.8 gegl 0.2.0 installs fine.
comment:8 Changed 12 years ago by sasoph@…
Upgrading to 10.6 isn't an option for those of us with PowerPC CPUs for which 10.5.8 is the final Apple release.
comment:10 Changed 12 years ago by trog24 (Frank J. R. Hanstick)
I too have the same MacOS 10.5.8 limitation due to still using a PowerPC G4.
comment:11 follow-up: 13 Changed 12 years ago by nerdling (Jeremy Lavergne)
Replying to jeremyhu@…:
Look at the dyld-headers port for an example on how to fix the issue.
If anyone with a Leopard/PPC box wants to give it a spin, Jeremyhu's hint is this needs added to the portfile (sudo port edit gegl
):
post-patch { foreach header [glob ${worksrcpath}/{,*/,*/*/}*.h] { if {${os.major} < 10} { reinplace "s|__MAC_10_6|__MAC_NA|g" ${header} reinplace "s|AVAILABLE_MAC_OS_X_VERSION_10_\\(.\\)_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6|AVAILABLE_MAC_OS_X_VERSION_10_\\1_AND_LATER|" ${header} reinplace "s|AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER|__attribute__((unavailable))|g" ${header} } } }
comment:12 Changed 12 years ago by nerdling (Jeremy Lavergne)
Cc: | mdbecque@… added |
---|
comment:13 follow-up: 14 Changed 12 years ago by nerdling (Jeremy Lavergne)
Replying to snc@…:
foreach header [glob ${worksrcpath}/{,*/,*/*/}*.h] {
if {${os.major} < 10} {
…
}
}
If this does work and there's no need for other reinplace calls for the other OSes, it'd be wise to put the foreach inside the if block.
comment:14 Changed 12 years ago by mdbecque@…
I edited the port as listed above. The reinplace command ran as I can see it in the log file but there is another error. It is a buffer error.
:info:build ../../gegl/opencl/cl_ext.h:150: warning: 'weak_import' attribute ignored :info:build ../../gegl/opencl/cl_ext.h:156: warning: 'weak_import' attribute ignored :info:build ../../gegl/opencl/cl_ext.h:171: warning: 'weak_import' attribute ignored :info:build make[3]: * [gegl-buffer.lo] Error 1
I can post the whole log if you'd like to see it. thanks
Replying to snc@…:
Replying to snc@…:
foreach header [glob ${worksrcpath}/{,*/,*/*/}*.h] {
if {${os.major} < 10} {
…
}
}
If this does work and there's no need for other reinplace calls for the other OSes, it'd be wise to put the foreach inside the if block.
comment:15 follow-up: 16 Changed 12 years ago by nerdling (Jeremy Lavergne)
Thanks to mdbecque for trying out the suggested find/replace, but he ends up with another error:
:info:build ../../gegl/opencl/cl_gl.h:37:30: error: OpenGL/CGLDevice.h: No such file or directory
comment:16 Changed 12 years ago by jeremyhu (Jeremy Huddleston Sequoia)
Replying to snc@…:
Thanks to mdbecque for trying out the suggested find/replace, but he ends up with another error:
:info:build ../../gegl/opencl/cl_gl.h:37:30: error: OpenGL/CGLDevice.h: No such file or directory
/System/Library/Frameworks/OpenGL.framework/Headers/CGLDevice.h appeared in Snow Leopard and contains:
#include <OpenGL/CGLTypes.h> typedef struct CGLShareGroupRec *CGLShareGroup; typedef struct CGLShareGroupRec *CGLShareGroupObj; CGLShareGroupObj CGLGetShareGroup(CGLContextObj ctx);
Check if the code actually needs the ShareGroup declarations. If not, try replacing the include with an include of <OpenGL/CGLTypes.h>
comment:17 follow-up: 18 Changed 12 years ago by jeremyhu (Jeremy Huddleston Sequoia)
I'm guessing the AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER may be around the share group code, so you can probably do this:
#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1060 #include <OpenGL/CGLDevice.h> #else #include <OpenGL/CGLTypes.h> #endif
comment:18 Changed 12 years ago by rambiusparkisanius@…
Replying to jeremyhu@…:
I'm guessing the AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER may be around the share group code, so you can probably do this:
#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1060 #include <OpenGL/CGLDevice.h> #else #include <OpenGL/CGLTypes.h> #endif
I confirm this works. I just built gegl with it.
comment:19 Changed 12 years ago by nerdling (Jeremy Lavergne)
So here's what it sounds like is suggested for a working patch:
post-patch { if {${os.major} < 10} { foreach header [glob ${worksrcpath}/{,*/,*/*/}*.h] { reinplace "s|__MAC_10_6|__MAC_NA|g" ${header} reinplace "s|AVAILABLE_MAC_OS_X_VERSION_10_\\(.\\)_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6|AVAILABLE_MAC_OS_X_VERSION_10_\\1_AND_LATER|" ${header} reinplace "s|AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER|__attribute__((unavailable))|g" ${header} } reinplace s|OpenGL/CGLDevice.h|OpenGL/CGLTypes.h| ${worksrcpath}/gegl/opencl/cl_gl.h } }
Changed 12 years ago by nerdling (Jeremy Lavergne)
Attachment: | Portfile-gegl.diff added |
---|
suggested patch
comment:20 follow-up: 24 Changed 12 years ago by sasoph@…
10.5.8 PPC, Xcode 3.1.4
In file included from ../../gegl/gegl.h:28, from ../../gegl/opencl/gegl-cl-color.h:4, from ../../gegl/opencl/gegl-cl.h:6, from gegl-buffer-cl-iterator.h:5, from gegl-buffer-private.h:27, from gegl-tile-backend.c:25: ../../gegl/property-types/gegl-color.h:110: error: syntax error before 'unsigned' ../../gegl/property-types/gegl-color.h:121: error: syntax error before 'unsigned' make[3]: *** [gegl-tile-backend.lo] Error 1 make[3]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_graphics_gegl/gegl/work/gegl-0.2.0/gegl/buffer' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_graphics_gegl/gegl/work/gegl-0.2.0/gegl' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_graphics_gegl/gegl/work/gegl-0.2.0' make: *** [all] Error 2
comment:21 follow-ups: 22 25 Changed 12 years ago by jeremyhu (Jeremy Huddleston Sequoia)
void gegl_color_set_pixel (GeglColor *color, const Babl *format, const void *pixel); // line 110 ... void gegl_color_get_pixel (GeglColor *color, const Babl *format, void *pixel); // line 121
I wonder if "pixel" is #defined to something else... Try changing those occurrences of pixel to "pixelp" to see if it fixed the issue...
comment:22 Changed 12 years ago by mdbecque@…
Jeremyhu suggested the below reinplace be added to the post-patch of my port file to try his suggestion.
reinplace "s:\*pixel:\*pixelp:" ${worksrcpath}/gegl/property-types/gegl-color.h
No luck with a clean build. My log file is attached. Thanks
Replying to jeremyhu@…:
void gegl_color_set_pixel (GeglColor *color, const Babl *format, const void *pixel); // line 110 ... void gegl_color_get_pixel (GeglColor *color, const Babl *format, void *pixel); // line 121I wonder if "pixel" is #defined to something else... Try changing those occurrences of pixel to "pixelp" to see if it fixed the issue...
Changed 12 years ago by mdbecque@…
Build log after changing pixel to pixelp.
comment:24 Changed 12 years ago by myshlev@…
Replying to sasoph@…:
10.5.8 PPC, Xcode 3.1.4
In file included from ../../gegl/gegl.h:28, from ../../gegl/opencl/gegl-cl-color.h:4, from ../../gegl/opencl/gegl-cl.h:6, from gegl-buffer-cl-iterator.h:5, from gegl-buffer-private.h:27, from gegl-tile-backend.c:25: ../../gegl/property-types/gegl-color.h:110: error: syntax error before 'unsigned' ../../gegl/property-types/gegl-color.h:121: error: syntax error before 'unsigned' make[3]: *** [gegl-tile-backend.lo] Error 1
Please see my comment #6 here https://bugzilla.gnome.org/show_bug.cgi?id=673969 (as stargood) On Leopard 10.5.8 PPC this error will go away if you switch your compiler to Apple GCC 3.3 which is available in Xcode 3.1.4. The resulting gegl build seems to be okay.
comment:25 Changed 12 years ago by mklein-de (Michael Klein)
Replying to jeremyhu@…:
I wonder if "pixel" is #defined to something else... Try changing those occurrences of pixel to "pixelp" to see if it fixed the issue...
yup, the preprocessor output for the offending code is:
# 108 "../../gegl/property-types/gegl-color.h" void gegl_color_set_pixel (GeglColor *color, const Babl *format, const void *__attribute__((altivec(pixel__))) unsigned short); # 119 "../../gegl/property-types/gegl-color.h" void gegl_color_get_pixel (GeglColor *color, const Babl *format, void *__attribute__((altivec(pixel__))) unsigned short);
The closest source for the redefinition I could find comes from /usr/lib/gcc/powerpc-apple-darwin9/4.0.1/include/altivec.h
:
#if defined(__APPLE_ALTIVEC__) #warning Ignoring <altivec.h> because "-faltivec" specified #else /* You are allowed to undef these for C++ compatibility. */ #define vector __vector #define pixel __pixel #define bool __bool /* APPLE LOCAL end AltiVec */
I'm trying to build with -faltivec now...
Changed 12 years ago by mklein-de (Michael Klein)
Attachment: | gegl-Portfile-altivec.diff added |
---|
add -faltivec to cflags and cxxflags on powerpc
comment:26 Changed 12 years ago by jeremyhu (Jeremy Huddleston Sequoia)
r97326 should get this building for you.
comment:27 Changed 12 years ago by jeremyhu (Jeremy Huddleston Sequoia)
Resolution: | → fixed |
---|---|
Status: | new → closed |
If the altivec issue remains, please open a new bug. They are different issues.
Caused by r95348