gcc linker failing when building gluegen

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

gcc linker failing when building gluegen

KBreaker
I'm attempting to build gluegen from the command line on a Windows 7 64-bit OS.

I've followed the instructions on the wiki to build gluegen/jogl but am getting the following errors on the gluegen.build.c.impl step (with -v enabled):

       [cc] gcc -O2 -c -mwindows -fno-rtti -DNDEBUG -DDBUILD_DLL -D_STRICT_ANSI -D_JNI_IMPLEMENTATION_ -DWINVER=0x0601 -D_WIN32_WINNT=0x0601
 -ID:\git\gluegen\build\gensrc\native -ID:\git\gluegen\build\gensrc\native\Windows "-IC:\Program Files (x86)\Java\jdk1.7.0_60\include" "-IC:
\Program Files (x86)\Java\jdk1.7.0_60\include\win32" -ID:\git\gluegen\make\stub_includes\platform D:\git\gluegen\src\native\windows\WindowsD
ynamicLinkerImpl_JNI.c D:\git\gluegen\src\native\common\JVMUtil.c D:\git\gluegen\src\native\common\PointerBuffer.c D:\git\gluegen\src\native
\common\MachineDescriptionRuntime.c D:\git\gluegen\src\native\common\Platforms.c D:\git\gluegen\src\native\common\JarUtil.c
       [cc] cc1.exe: warning: command line option '-fno-rtti' is valid for C++/ObjC++ but not for C [enabled by default]
       [cc] cc1.exe: warning: command line option '-fno-rtti' is valid for C++/ObjC++ but not for C [enabled by default]
       [cc] cc1.exe: warning: command line option '-fno-rtti' is valid for C++/ObjC++ but not for C [enabled by default]
       [cc] cc1.exe: warning: command line option '-fno-rtti' is valid for C++/ObjC++ but not for C [enabled by default]
       [cc] cc1.exe: warning: command line option '-fno-rtti' is valid for C++/ObjC++ but not for C [enabled by default]
       [cc] cc1.exe: warning: command line option '-fno-rtti' is valid for C++/ObjC++ but not for C [enabled by default]
       [cc] Starting link
       [cc] gcc -m32 -Wl,--enable-auto-import -Wl,--enable-stdcall-fixup -Wl,--kill-at -static-libgcc -shared -o libgluegen-rt.so WindowsDyn
amicLinkerImpl_JNI.o JVMUtil.o PointerBuffer.o MachineDescriptionRuntime.o Platforms.o JarUtil.o
       [cc] Cannot export Java_com_jogamp_common_nio_PointerBuffer_getDirectBufferAddressImpl: symbol not found
       [cc] Cannot export Java_com_jogamp_common_os_Platform_currentTimeMicros: symbol not found
       [cc] Cannot export Java_com_jogamp_common_os_Platform_currentTimeMillis: symbol not found
       [cc] Cannot export Java_com_jogamp_common_util_JarUtil_fixNativeLibAttribs: symbol not found
       [cc] Cannot export Java_jogamp_common_jvm_JVMUtil_initialize: symbol not found
       [cc] Cannot export Java_jogamp_common_os_MachineDescriptionRuntime_getAlignmentDoubleImpl: symbol not found
       [cc] Cannot export Java_jogamp_common_os_MachineDescriptionRuntime_getAlignmentFloatImpl: symbol not found
       [cc] Cannot export Java_jogamp_common_os_MachineDescriptionRuntime_getAlignmentInt16Impl: symbol not found
       [cc] Cannot export Java_jogamp_common_os_MachineDescriptionRuntime_getAlignmentInt32Impl: symbol not found
       [cc] Cannot export Java_jogamp_common_os_MachineDescriptionRuntime_getAlignmentInt64Impl: symbol not found
       [cc] Cannot export Java_jogamp_common_os_MachineDescriptionRuntime_getAlignmentInt8Impl: symbol not found
       [cc] Cannot export Java_jogamp_common_os_MachineDescriptionRuntime_getAlignmentIntImpl: symbol not found
       [cc] Cannot export Java_jogamp_common_os_MachineDescriptionRuntime_getAlignmentLongDoubleImpl: symbol not found
       [cc] Cannot export Java_jogamp_common_os_MachineDescriptionRuntime_getAlignmentLongImpl: symbol not found
       [cc] Cannot export Java_jogamp_common_os_MachineDescriptionRuntime_getAlignmentPointerImpl: symbol not found
       [cc] Cannot export Java_jogamp_common_os_MachineDescriptionRuntime_getPageSizeInBytesImpl: symbol not found
       [cc] Cannot export Java_jogamp_common_os_MachineDescriptionRuntime_getPointerSizeInBytesImpl: symbol not found
       [cc] Cannot export Java_jogamp_common_os_MachineDescriptionRuntime_getSizeOfDoubleImpl: symbol not found
       [cc] Cannot export Java_jogamp_common_os_MachineDescriptionRuntime_getSizeOfFloatImpl: symbol not found
       [cc] Cannot export Java_jogamp_common_os_MachineDescriptionRuntime_getSizeOfIntImpl: symbol not found
       [cc] Cannot export Java_jogamp_common_os_MachineDescriptionRuntime_getSizeOfLongDoubleImpl: symbol not found
       [cc] Cannot export Java_jogamp_common_os_MachineDescriptionRuntime_getSizeOfLongImpl: symbol not found
       [cc] Cannot export Java_jogamp_common_os_WindowsDynamicLinkerImpl_FreeLibrary__J: symbol not found
       [cc] Cannot export Java_jogamp_common_os_WindowsDynamicLinkerImpl_GetLastError__: symbol not found
       [cc] Cannot export Java_jogamp_common_os_WindowsDynamicLinkerImpl_GetProcAddressA__JLjava_lang_String_2: symbol not found
       [cc] Cannot export Java_jogamp_common_os_WindowsDynamicLinkerImpl_LoadLibraryW__Ljava_lang_String_2: symbol not found
       [cc] d:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.8.1/../../../../x86_64-w64-mingw32/bin/ld.exe: i386:x86-64 architecture of input
file `WindowsDynamicLinkerImpl_JNI.o' is incompatible with i386 output
       [cc] d:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.8.1/../../../../x86_64-w64-mingw32/bin/ld.exe: i386:x86-64 architecture of input
file `JVMUtil.o' is incompatible with i386 output
       [cc] d:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.8.1/../../../../x86_64-w64-mingw32/bin/ld.exe: i386:x86-64 architecture of input
file `PointerBuffer.o' is incompatible with i386 output
       [cc] d:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.8.1/../../../../x86_64-w64-mingw32/bin/ld.exe: i386:x86-64 architecture of input
file `MachineDescriptionRuntime.o' is incompatible with i386 output
       [cc] d:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.8.1/../../../../x86_64-w64-mingw32/bin/ld.exe: i386:x86-64 architecture of input
file `Platforms.o' is incompatible with i386 output
       [cc] d:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.8.1/../../../../x86_64-w64-mingw32/bin/ld.exe: i386:x86-64 architecture of input
file `JarUtil.o' is incompatible with i386 output
       [cc] WindowsDynamicLinkerImpl_JNI.o:WindowsDynamicLinkerImpl_JNI.c:(.text+0x3): undefined reference to `_imp_FreeLibrary'
       [cc] WindowsDynamicLinkerImpl_JNI.o:WindowsDynamicLinkerImpl_JNI.c:(.text+0x13): undefined reference to `_imp_GetLastError'
       [cc] WindowsDynamicLinkerImpl_JNI.o:WindowsDynamicLinkerImpl_JNI.c:(.text+0x55): undefined reference to `_imp_GetProcAddress'
       [cc] WindowsDynamicLinkerImpl_JNI.o:WindowsDynamicLinkerImpl_JNI.c:(.text+0x83): undefined reference to `_imp_GetProcAddress'
       [cc] WindowsDynamicLinkerImpl_JNI.o:WindowsDynamicLinkerImpl_JNI.c:(.text+0xfb): undefined reference to `calloc'
       [cc] WindowsDynamicLinkerImpl_JNI.o:WindowsDynamicLinkerImpl_JNI.c:(.text+0x135): undefined reference to `_imp_LoadLibraryW'
       [cc] WindowsDynamicLinkerImpl_JNI.o:WindowsDynamicLinkerImpl_JNI.c:(.text+0x140): undefined reference to `free'
       [cc] WindowsDynamicLinkerImpl_JNI.o:WindowsDynamicLinkerImpl_JNI.c:(.text+0x153): undefined reference to `_imp_LoadLibraryW'
       [cc] d:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.8.1/../../../../x86_64-w64-mingw32/bin/ld.exe: WindowsDynamicLinkerImpl_JNI.o: ba
d reloc address 0x0 in section `.pdata'
       [cc] collect2.exe: error: ld returned 1 exit status
  [antcall] Exiting D:\git\gluegen\make\build.xml.



I've verified the .c and .h files exist and appear correct, and the generated .o files do contain the functions that the linker complains it cannot export.  Any guidance would be much appreciated.
Reply | Threaded
Open this post in threaded view
|

Re: gcc linker failing when building gluegen

Sven Gothel
Administrator
On 07/10/2014 06:16 PM, KBreaker [via jogamp] wrote:
> file `JVMUtil.o' is incompatible with i386 output
>        [cc]
> d:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.8.1/../../../../x86_64-w64-mingw32/bin/ld.exe:
> i386:x86-64 architecture of input

you are using the wrong compiler set, i.e. 64bit where we
try to build 32bit libraries:

"gcc -m32"

~Sven



signature.asc (894 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: gcc linker failing when building gluegen

KBreaker
What do I need to change, then?
Reply | Threaded
Open this post in threaded view
|

Re: gcc linker failing when building gluegen

KBreaker
Okay it's fixed.

The line on the wiki that says:
"We have to use MinGW64 not just for the 64bit build, but for the 32bit build as well. Homepage is http://mingw-w64.sourceforge.net."
is confusing and makes it sound like I should download Windows /x86_64 (64 bit) instead of the Windows /x86 (32 bit) version.