AIX: Ignore duplicate symbols in multiple headers?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

We have gcc 4.8.3 installed on AIX 6.1; the binaries were kindly
provided by the maintainter of this site:
http://www.perzl.org/aix/index.php?n=Main.Gcc.

Been trying to install/compile different R and Python packages, and
I've been running into issues where multiple included header files
contain the same symbols.  An example could be found here
https://github.com/Rdatatable/data.table/issues/1351, where we
ultimately fixed the compilation error by changing the symbol names.

Trying to compile numpy and other packages, and am also getting
similar errors.  When googling 'gcc aix previous declaration
conflicting types', I see that many packages run into this problem.

My question is why does this happen only in AIX?  Is there any way to
fix this?  My guess is that GCC on other OS takes the symbol from the
first header it encounters for the particular file, and ignores the
rest.  Can one specify this behavior in AIX as well?

I'm pasting some sample error messages that I'm seeing while compiling
numpy.  Hope this would lead me to a solution.  Thanks!

    In file included from /sas/data04/opt/include/python3.5m/Python.h:8:0,

                     from numpy/core/src/umath/test_rational.c.src:6:

    /sas/data04/opt/include/python3.5m/pyconfig.h:1455:0: warning:
"_XOPEN_SOURCE" redefined [enabled by default]

     #define _XOPEN_SOURCE 700

     ^

    In file included from
/opt/freeware/lib/gcc/powerpc-ibm-aix6.1.0.0/4.8.3/include-fixed/math.h:51:0,

                     from numpy/core/src/umath/test_rational.c.src:5:

    /usr/include/standards.h:152:0: note: this is the location of the
previous definition

     #define _XOPEN_SOURCE  600

     ^

    In file included from /sas/data04/opt/include/python3.5m/Python.h:25:0,

                     from numpy/core/src/umath/test_rational.c.src:6:

    /opt/freeware/lib/gcc/powerpc-ibm-aix6.1.0.0/4.8.3/include-fixed/stdio.h:512:12:
error: conflicting types for 'fgetpos64'

     extern int fgetpos64(FILE *, fpos64_t *);

                ^

    In file included from /sas/data04/opt/include/python3.5m/Python.h:25:0,

                     from numpy/core/src/umath/test_rational.c.src:6:

    /opt/freeware/lib/gcc/powerpc-ibm-aix6.1.0.0/4.8.3/include-fixed/stdio.h:311:12:
note: previous declaration of 'fgetpos64' was here

     extern int fgetpos(FILE *__restrict__, fpos_t *__restrict__);

                ^

    In file included from /sas/data04/opt/include/python3.5m/Python.h:25:0,

                     from numpy/core/src/umath/test_rational.c.src:6:

    /opt/freeware/lib/gcc/powerpc-ibm-aix6.1.0.0/4.8.3/include-fixed/stdio.h:515:12:
error: conflicting types for 'fseeko64'

     extern int fseeko64(FILE *, off64_t, int);

                ^

    In file included from /sas/data04/opt/include/python3.5m/Python.h:25:0,

                     from numpy/core/src/umath/test_rational.c.src:6:

    /opt/freeware/lib/gcc/powerpc-ibm-aix6.1.0.0/4.8.3/include-fixed/stdio.h:455:12:
note: previous declaration of 'fseeko64' was here

     extern int fseeko(FILE *, off_t, int);

                ^

-- Vinh



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux