After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 536044 - Compilation fails with "unexpected $undefined"
Compilation fails with "unexpected $undefined"
Status: RESOLVED NOTABUG
Product: ORBit2
Classification: Deprecated
Component: general
unspecified
Other Linux
: Normal critical
: ---
Assigned To: ORBit maintainers
ORBit maintainers
Depends on:
Blocks:
 
 
Reported: 2008-06-01 11:50 UTC by Björn Lindqvist
Modified: 2008-08-17 00:56 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Björn Lindqvist 2008-06-01 11:50:23 UTC
Like this:

(rm -f corba-defs.h corba-defs-stubs.c corba-defs-skels.c corba-defs-common.c corba-defs-imodule.c corba-defs-skelimpl.c || true) > /dev/null
../../../src/idl-compiler/orbit-idl-2 -I../../../src/idl/CORBA_PIDL -I../../../src/idl/CORBA -I../../../src/idl/interop -I../../../src/orb/orb-core --noskels --nodefskels --nostubs --noidata --nocommon --showcpperrors --define=Object=OObject --define=TypeCode=TTypeCode --deps ./.deps/corba-defs.idl.P ../../../src/orb/orb-core/corba-defs.idl
orbit-idl-2 2.14.13 compiling
  mode, show preprocessor errors, passes: headers 

Processing file ../../../src/orb/orb-core/corba-defs.idl
../../../src/orb/orb-core/corba-defs.idl:20: Error: syntax error, unexpected $undefined

** (orbit-idl-2:15777): WARNING **: ../../../src/orb/orb-core/corba-defs.idl compilation failed
make[8]: *** [corba-defs.h] Fel 1
Comment 1 Björn Lindqvist 2008-06-01 14:57:30 UTC
This maybe is a problem in libIDL and not in ORBit2. The following test code will print "OK!" when linked to libIDL 0.8.9 shipped with Ubuntu Gutsy:

    #include <libIDL/IDL.h>
    int main (int argc, char *argv)
    {
        IDL_ns ns;
        IDL_tree tree;
        int errcode = IDL_parse_filename ("test.idl", "", NULL,
                                          &tree, &ns,
                                          0, 4);
        switch (errcode)
        {
        case IDL_SUCCESS:
            printf ("OK!\n");
            break;
        case IDL_ERROR:
            printf ("IDL Error\n");
            break;
        default:
           printf ("Other error: %d\n", errcode);
        }
    }

test.idl:

    module Arg {
        const long MOO    = 1;
    };

when linked against libIDL 0.8.11 from svn it prints:

    test.idl:4: Error: syntax error, unexpected $undefined
    IDL Error

Comment 2 Christian Persch 2008-06-01 22:24:31 UTC
CCing tml, since he committed to both ORBit and libIDL recently.

Also relevant might be these build failures in ORBit2 from the autobuilders:
works: http://jhbuild.bxlug.be/builds/2008-05-20-0001/
fails: http://jhbuild.bxlug.be/builds/2008-05-21-0001/ 
Comment 3 Björn Lindqvist 2008-08-10 03:17:47 UTC
ORBit2 still doesn't build...
Comment 4 Björn Lindqvist 2008-08-17 00:56:26 UTC
Turns out this problem was my own damn fault although the exact
problem is unbelievably strange. The test program worked with the
tarball for libIDL 0.8.1 but not for libIDL 0.8.2. The only important
difference between those versions is that 0.8.1's configure script was
generated using Autoconf 2.53 and 0.8.2's using Autoconf 2.57. 

For some reason, using the newer autoconf sets the CPP_NOSTDINC macro
to '-I-' instead of '' on my system. That macro is used in
IDL_parse_filename in util.c to build a string to send to the C
preprocessor. Substituted with the filename of the IDL file it
becomes:

gcc -E -I- - -I.  < "test.idl" 2>/dev/null

And running that on a fairly recent gcc outputs:

cc1: note: obsolete option -I- used, please use -iquote instead

Except that that is printed on stderr and is redirected to
/dev/null. Well that would have happened, unless you are using a
wrapper script around gcc which redirects stderr to stdout to help grc
colorize gcc's error messages. :) The parser generated by flex barfs
on that line with an even more arcane error:

test.idl:4: Error: syntax error, unexpected $undefined

So there is no bug here. On the other hand, the code that checks and
sets CPP_NOSTDINC seem to be completely pointless.