You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@harmony.apache.org by Nathan Beyer <nd...@apache.org> on 2009/07/06 02:11:35 UTC
Re: [classlib][awt][macosx] Compiling lcmms component fails with
duplicate symbol
Anyone have any thoughts on this? I've come back to this one and the
macros don't seem to be doing the job of excluding everything
appropriately.
-Nathan
On Wed, May 13, 2009 at 11:00 PM, Nathan Beyer<nd...@apache.org> wrote:
> -build-native-common:
> [echo] Making "" in
> /Users/nathan/Development/harmony/working_classlib/modules/awt/src/main/native/lcmm/unix
> [exec] cc -DMACOSX -DMACOSX_X86 -DHYX86 -DIPv6_FUNCTION_SUPPORT
> -D_REENTRANT -I/opt/local/include
> -I/Users/nathan/Development/harmony/working_classlib/deploy/include
> -I/Users/nathan/Development/harmony/working_classlib/deploy/jdk/include
> -I. -I../shared/ -Icommon -I../shared/include -fPIC -fno-common -ggdb
> -O0 -Werror -c -o ../shared/cmmerror.o ../shared/cmmerror.c
> [exec] cc -DMACOSX -DMACOSX_X86 -DHYX86 -DIPv6_FUNCTION_SUPPORT
> -D_REENTRANT -I/opt/local/include
> -I/Users/nathan/Development/harmony/working_classlib/deploy/include
> -I/Users/nathan/Development/harmony/working_classlib/deploy/jdk/include
> -I. -I../shared/ -Icommon -I../shared/include -fPIC -fno-common -ggdb
> -O0 -Werror -c -o ../shared/cmmio.o ../shared/cmmio.c
> [exec] cc -DMACOSX -DMACOSX_X86 -DHYX86 -DIPv6_FUNCTION_SUPPORT
> -D_REENTRANT -I/opt/local/include
> -I/Users/nathan/Development/harmony/working_classlib/deploy/include
> -I/Users/nathan/Development/harmony/working_classlib/deploy/jdk/include
> -I. -I../shared/ -Icommon -I../shared/include -fPIC -fno-common -ggdb
> -O0 -Werror -c -o ../shared/cmmxforms.o ../shared/cmmxforms.c
> [exec] cc -DMACOSX -DMACOSX_X86 -DHYX86 -DIPv6_FUNCTION_SUPPORT
> -D_REENTRANT -I/opt/local/include
> -I/Users/nathan/Development/harmony/working_classlib/deploy/include
> -I/Users/nathan/Development/harmony/working_classlib/deploy/jdk/include
> -I. -I../shared/ -Icommon -I../shared/include -fPIC -fno-common -ggdb
> -O0 -Werror -c -o ../shared/NativeCMM.o ../shared/NativeCMM.c
> [exec] cc -DMACOSX -DMACOSX_X86 -DHYX86 -DIPv6_FUNCTION_SUPPORT
> -D_REENTRANT -I/opt/local/include
> -I/Users/nathan/Development/harmony/working_classlib/deploy/include
> -I/Users/nathan/Development/harmony/working_classlib/deploy/jdk/include
> -I. -I../shared/ -Icommon -I../shared/include -fPIC -fno-common -ggdb
> -O0 -Werror -c -o ../shared/NativeImageFormat.o
> ../shared/NativeImageFormat.c
> [exec] echo "HYLCMM_0.1 {" >liblcmm.exp
> [exec] echo " global :" >>liblcmm.exp
> [exec] sed -e's/^/ /;s/$/;/' <exports.txt >>liblcmm.exp
> [exec] echo " local : *;" >>liblcmm.exp
> [exec] echo "};" >>liblcmm.exp
> [exec] cc -dynamiclib -dynamic -install_name liblcmm.dylib -o
> ../liblcmm.dylib \
> [exec] ../shared/cmmerror.o ../shared/cmmio.o
> ../shared/cmmxforms.o ../shared/NativeCMM.o
> ../shared/NativeImageFormat.o
> -L/Users/nathan/Development/harmony/working_classlib/deploy/lib/
> -L/Users/nathan/Development/harmony/working_classlib/deploy/jdk/jre/bin/
> /Users/nathan/Development/harmony/working_classlib/deploy/lib/libhycommon.a
> -lhythr /Users/nathan/Development/harmony/working_classlib/deploy/lib/libhyzip.a
> -lhyzlib /Users/nathan/Development/harmony/working_classlib/deploy/lib/libhypool.a
> /Users/nathan/Development/harmony/working_classlib/deploy/lib/libhyfdlibm.a
> -lvmi -L/opt/local/lib -lc -lm -ldl -liconv -ldl -llcms
> [exec] ld: duplicate symbol _clr_NIF_cmmFormatID in
> ../shared/NativeCMM.o and ../shared/cmmerror.o
> [exec] collect2: ld returned 1 exit status
> [exec] make: *** [../liblcmm.dylib] Error 1
>
>
> 2009/5/13 Tim Ellison <t....@gmail.com>:
>> Alexey Petrenko wrote:
>>> Does not standard way with if/define work here?
>>
>> Should do, both files have the equivalent of
>>
>> #ifndef _Included_NativeImageFormat
>> #define _Included_NativeImageFormat
>>
>> at the start.
>>
>> Nathan, can you post the actual compiler output?
>>
>> Regards,
>> Tim
>>
>>
>>> 13.05.2009, в 6:21, Nathan Beyer <nd...@apache.org> написал(а):
>>>
>>>> While trying to compile the lcmms bit [1] of the awt module I'm
>>>> getting several "ld: dupblicate symbol" errors from NativeCMM.o and
>>>> NativeImageFormat.o on the 'jfield' variables defined in
>>>> NativeImageFormat.h [2]. While looking at the header files, I noticed
>>>> a circular include - NativeCMM.h includes NativeImageFormat.h and
>>>> NativeImageFormat.h includes NativeCMM.h.
>>>>
>>>> Any thoughts on how to unwind this?
>>>>
>>>> -Nathan
>>>>
>>>> [1]
>>>> http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/awt/src/main/native/lcmm/shared/
>>>>
>>>> [2]
>>>> http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/awt/src/main/native/lcmm/shared/NativeImageFormat.h?annotate=476395
>>>>
>>>> line 22-34
>>>
>>
>