ORBit2 build failing: orbit-idl-driver.c:43

Here’s a funky error:

orbit-idl-driver.c: In function 'orbit_idl_tree_fake_ops':
orbit-idl-driver.c:43: error: 'G_GNUC_PRETTY_FUNCTION' undeclared (first use in this function) orbit-idl-driver.c:43: error: (Each undeclared identifier is reported only once
orbit-idl-driver.c:43: error: for each function it appears in.)
gmake[3]: *** [orbit-idl-driver.o] Error 1
gmake[3]: Leaving directory `/usr/ports/devel/ORBit2/work/ORBit2-2.14.12/src/idl-compiler'

As it turned out, this is related to glib (version 2.15.4) deprecating ‘G_GNUC_FUNCTION’, ‘G_GNUC_PRETTY_FUNCTION’, maybe others. orbit-idl-driver.c uses it, but not as transparently as you would expect: if you ‘grep G_GNUC orbit-idl-driver.c’, you won’t find it.

Now, one workaround is to try and get glib 2.15.3 and hope you won’t need it updated until ORBit2 gets a fix (just one fix…). Basically, this is lame.

Another way is to change

/usr/ports/devel/ORBit2/work/ORBit2-2.14.12/src/idl-compiler/Makefile

to have

DISABLE_DEPRECATED_CFLAGS =

instead of

DISABLE_DEPRECATED_CFLAGS = -DG_DISABLE_DEPRECATED

That is, you don’t disallow (i.e. you allow) deprecated constants (well, not deprecated cflags!) to be used by cc.

Advertisements

4 Comments

  1. leov
    Posted June 20, 2008 at 1:09 am | Permalink | Reply

    Thanks, this saved my day : )

  2. Posted January 22, 2013 at 8:58 pm | Permalink | Reply

    * You could simply not enable maintainer mode, then it won’t disable deprecated CFLAGS
    ~ grep -B2 -A2 DISABLE_DEPRECATED configure.in

    if test “$enable_maintainer_mode” = “yes”; then
    DISABLE_DEPRECATED_CFLAGS=” \
    -DG_DISABLE_DEPRECATED -DG_DISABLE_SINGLE_INCLUDES”
    AC_SUBST(DISABLE_DEPRECATED_CFLAGS)
    fi

    * Throw in ‘–enable-maintainer-mode=no’
    ~ ./autogen.sh –prefix=/usr –disable-static –enable-maintainer-mode=no && make

    • thandle
      Posted January 22, 2013 at 11:01 pm | Permalink | Reply

      Uh, OK. This is 4 years old, though. I thought it’d be fixed by now.

      • Posted January 22, 2013 at 11:10 pm | Permalink

        Apparently not. I’ve been having this problem with Orbit2 and mate-corba.
        Too many questions on the web and not enough answers anyway. Figured I’d put it out there in case someone else is searching

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: