Cannot build jogl-2.1.1

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

Cannot build jogl-2.1.1

Gerco Ballintijn
Hi,

I'm trying to locally build JOGL 2.1.1 on Windows 7 using MinGW, but the build fails unfortunately. Gluegen builds fine. In particular, the JOGL build fails while compiling libav.
The output is:

>
> c.build.jogl.prepare:
>      [echo] Output lib name = jogl_ffmpegv08
>      [echo] Compiling jogl_ffmpegv08
>        [cc] Starting dependency analysis for 3 files.
>        [cc] 3 files are up to date.
>        [cc] 0 files to be recompiled from dependency analysis.
>        [cc] 1 total files to be compiled.
>        [cc] cc1.exe: warning: command line option '-fno-rtti' is valid for C++/ObjC++ but not for C [enabled by default]
>        [cc] C:\Users\gerco\Workspaces\JOGL\workspace-jogl-2.1.1\jogl\src\jogl\native\libav\ffmpeg_dshow.c:39:21: fatal error: strsafe.h: No such file or directory
>        [cc] compilation terminated.
>
> BUILD FAILED
> C:\Users\gerco\Workspaces\JOGL\workspace-jogl-2.1.1\jogl\make\build.xml:75: The following error occurred while executing this line:
> C:\Users\gerco\Workspaces\JOGL\workspace-jogl-2.1.1\jogl\make\build-jogl.xml:1661: The following error occurred while executing this line:
> C:\Users\gerco\Workspaces\JOGL\workspace-jogl-2.1.1\jogl\make\build-jogl.xml:1468: gcc failed with return code 1
>
> Total time: 8 seconds
>

I'm using the MinGW downloaded via the link from the JOGL build page. Am I missing some dependency?

Cheers,
Gerco.
Reply | Threaded
Open this post in threaded view
|

Re: Cannot build jogl-2.1.1

gouessej
Administrator
Hi

Let me know whether it works for you:
http://stackoverflow.com/a/12474997
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: Cannot build jogl-2.1.1

Sven Gothel
Administrator
In reply to this post by Gerco Ballintijn
On 10/27/2013 10:34 AM, Gerco Ballintijn [via jogamp] wrote:
> Hi,
>
> I'm trying to locally build JOGL 2.1.1 on Windows 7 using MinGW, but the build
> fails unfortunately. Gluegen builds fine. In particular, the JOGL build fails
> while compiling libav.

Pls follow the updated HowTo/Wiki .. about how to build JOGL,
you have to use a new MinGW-64 version .,.. (yes, even for 32bit).

~Sven



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

Re: Cannot build jogl-2.1.1

Gerco Ballintijn
Hi,

I tried the extra include file; that solved one include problem, but brought me unfortunately to the next. :-(
The update JOGL build page, however, did result in a complete build, a running Gears demo.

Thanks,
Gerco.
Reply | Threaded
Open this post in threaded view
|

Re: Cannot build jogl-2.1.1

elect
I am trying to build jogl

I successfully built gluegen, although some ant imports remains unsatisfied..

Anyway

this is what I get

Starting link
C:\Program Files\Java\jdk1.7.0_51\jre\bin/jawt.dll: file not recognized: File format not recognized
collect2.exe: error: ld returned 1 exit status
D:\Documents\NetBeansProjects\jogl\make\build.xml:71: The following error occurred while executing this line:
D:\Documents\NetBeansProjects\jogl\make\build-nativewindow.xml:736: The following error occurred while executing this line:
D:\Documents\NetBeansProjects\jogl\make\build-nativewindow.xml:677: gcc failed with return code 1
BUILD FAILED (total time: 18 seconds)

My config is win 7 x64, Netbeans 8, Jdk 7 x64, MinGW x64 installed following the wiki
Reply | Threaded
Open this post in threaded view
|

Re: Cannot build jogl-2.1.1

Wade Walker
Administrator
elect wrote
Starting link
C:\Program Files\Java\jdk1.7.0_51\jre\bin/jawt.dll: file not recognized: File format not recognized
collect2.exe: error: ld returned 1 exit status
The "File format not recognized" usually means you're trying to link against a library of the wrong size (linking 32-bit to 64-bit or vice versa).
Reply | Threaded
Open this post in threaded view
|

Re: Cannot build jogl-2.1.1

elect
Wade Walker wrote
The "File format not recognized" usually means you're trying to link against a library of the wrong size (linking 32-bit to 64-bit or vice versa).
Is there a way to identify in which case I am in?
Reply | Threaded
Open this post in threaded view
|

Re: Cannot build jogl-2.1.1

Wade Walker
Administrator
You could look at DLLs with Dependency Walker, or maybe use the objdump.exe that comes with MinGW (you'd have to look up the flags, though).
Reply | Threaded
Open this post in threaded view
|

Re: Cannot build jogl-2.1.1

elect
Wade Walker wrote
You could look at DLLs with Dependency Walker, or maybe use the objdump.exe that comes with MinGW (you'd have to look up the flags, though).
Im missing these two

JVM.DLL
IESHIMS.DLL

I added to the Path

C:\Program Files\Java\jdk1.7.0_51\jre\bin\server;C:\Program Files\Internet Explorer

they are resolved although I still get a warning

Warning: At least one module has an unresolved import due to a missing export function in a delay-load dependent module.


Anyway, jogl still doesnt compile, same error

C:\Program Files\Java\jdk1.7.0_51\jre\bin/jawt.dll: file not recognized: File format not recognized
collect2.exe: error: ld returned 1 exit status
D:\Documents\NetBeansProjects\jogl\make\build.xml:71: The following error occurred while executing this line:
D:\Documents\NetBeansProjects\jogl\make\build-nativewindow.xml:736: The following error occurred while executing this line:
Reply | Threaded
Open this post in threaded view
|

Re: Cannot build jogl-2.1.1

Wade Walker
Administrator
It's ld reporting the error, which means it's trying to link your compiled code with library code of a different architecture. So either you've got 64-bit JDK mixed with 32-bit GCC/MinGW, or vice versa. You just need to check both those installs and make sure they're correct and not corrupt somehow. Worst-case, reinstall the JDK and GCC/MinGW to make sure they're both the same architecture.
Reply | Threaded
Open this post in threaded view
|

Re: Cannot build jogl-2.1.1

elect
Wade Walker wrote
It's ld reporting the error, which means it's trying to link your compiled code with library code of a different architecture. So either you've got 64-bit JDK mixed with 32-bit GCC/MinGW, or vice versa. You just need to check both those installs and make sure they're correct and not corrupt somehow. Worst-case, reinstall the JDK and GCC/MinGW to make sure they're both the same architecture.
Ok fine, I will give a try and reinstall both
Reply | Threaded
Open this post in threaded view
|

Re: Cannot build jogl-2.1.1

elect
I reinstalled the jdk, nothing changed

this is my complete output

http://pastebin.com/vVx0gM7B
Reply | Threaded
Open this post in threaded view
|

Re: Cannot build jogl-2.1.1

Wade Walker
Administrator
It's pretty easy to check your JDK and gcc versions:

java -version
gcc -v

Java should report "64-Bit Server", and gcc should report "Target: x86_64" (assuming you're on a 64-bit OS).

You're also building strangely with "ant -f". You're supposed to cd into gluegen/make and do "ant clean", then "ant". Then cd to jogl/make and do the same thing. You have to build exactly as the instructions say or it may not work correctly :)
Reply | Threaded
Open this post in threaded view
|

Re: Cannot build jogl-2.1.1

elect
Wade Walker wrote
It's pretty easy to check your JDK and gcc versions:

java -version
gcc -v

Java should report "64-Bit Server", and gcc should report "Target: x86_64" (assuming you're on a 64-bit OS).

You're also building strangely with "ant -f". You're supposed to cd into gluegen/make and do "ant clean", then "ant". Then cd to jogl/make and do the same thing. You have to build exactly as the instructions say or it may not work correctly :)

C:\Users\gbarbieri>java -version
java version "1.7.0_67"
Java(TM) SE Runtime Environment (build 1.7.0_67-b01)
Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode)

C:\Users\gbarbieri>gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=c:/program files (x86)/codeblocks/mingw/bin/../libexec/gcc/m
ingw32/4.7.1/lto-wrapper.exe
Target: mingw32
Configured with: ../../src/gcc-4.7.1/configure --build=mingw32 --enable-language
s=c,c++,ada,fortran,objc,obj-c++ --enable-threads=win32 --enable-libgomp --enabl
e-lto --enable-fully-dynamic-string --enable-libstdcxx-debug --enable-version-sp
ecific-runtime-libs --with-gnu-ld --disable-nls --disable-win32-registry --disab
le-symvers --disable-build-poststage1-with-cxx --disable-werror --prefix=/mingw3
2tdm --with-local-prefix=/mingw32tdm --enable-cxx-flags='-fno-function-sections
-fno-data-sections' --with-pkgversion=tdm-1 --enable-sjlj-exceptions --with-bugu
rl=http://tdm-gcc.tdragon.net/bugs
Thread model: win32
gcc version 4.7.1 (tdm-1)

You were right, it is using a x86 gcc (coming from codeblocks)

If I search for gcc.exe, I get the right one here:

C:\Program Files\mingw-builds\x64-4.8.1-win32-sjlj-rev5\mingw64\bin

and the codeblocks one here:

C:\Program Files (x86)\CodeBlocks\MinGW\bin

This is my PATH:

%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files\Microsoft Windows Performance Toolkit\;C:\Program Files (x86)\GNU\GnuPG\pub;C:\Program Files (x86)\CodeBlocks\MinGW\bin;C:\Program Files\NetBeans 8.0\extide\ant\bin;C:\Program Files\Java\jdk1.7.0_51\jre\bin\server;C:\Program Files\Internet Explorer


How can I make them co-exist together? Is exchanging the codeblocks path with the x64 mingw the only way?
Reply | Threaded
Open this post in threaded view
|

Re: Cannot build jogl-2.1.1

Sven Gothel
Administrator
On 09/03/2014 04:49 PM, elect [via jogamp] wrote:

> C:\Users\gbarbieri>gcc -v
> Using built-in specs.
> COLLECT_GCC=gcc
> COLLECT_LTO_WRAPPER=c:/program files (x86)/codeblocks/mingw/bin/../libexec/gcc/m
> ingw32/4.7.1/lto-wrapper.exe
> Target: mingw32
> Configured with: ../../src/gcc-4.7.1/configure --build=mingw32 --enable-language
> s=c,c++,ada,fortran,objc,obj-c++ --enable-threads=win32 --enable-libgomp --enabl
> e-lto --enable-fully-dynamic-string --enable-libstdcxx-debug --enable-version-sp
> ecific-runtime-libs --with-gnu-ld --disable-nls --disable-win32-registry --disab
> le-symvers --disable-build-poststage1-with-cxx --disable-werror --prefix=/mingw3
> 2tdm --with-local-prefix=/mingw32tdm --enable-cxx-flags='-fno-function-sections
> -fno-data-sections' --with-pkgversion=tdm-1 --enable-sjlj-exceptions --with-bugu
> rl=http://tdm-gcc.tdragon.net/bugs
> Thread model: win32
> gcc version 4.7.1 (tdm-1)
>
> You were right, it is using a x86 gcc (coming from codeblocks)
>
> If I search for gcc.exe, I get the right one here:
>
> C:\Program Files\mingw-builds\x64-4.8.1-win32-sjlj-rev5\mingw64\bin
>
> and the codeblocks one here:
>
> C:\Program Files (x86)\CodeBlocks\MinGW\bin
>
> This is my PATH:
>
> %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program
> Files\Microsoft Windows Performance Toolkit\;C:\Program Files
> (x86)\GNU\GnuPG\pub;C:\Program Files (x86)\CodeBlocks\MinGW\bin;C:\Program
> Files\NetBeans 8.0\extide\ant\bin;C:\Program
> Files\Java\jdk1.7.0_51\jre\bin\server;C:\Program Files\Internet Explorer
>
>
> How can I make them co-exist together? Is exchanging the codeblocks path with
> the x64 mingw the only way?
IMHO you should be able to answer this question by your own
given the information (validate compatibility).

We only have tested mingw64 as stated in our Howto.

Maybe you can share what 'codeblocks' even is,
and then present your results of compatibility investigation?

~Sven



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

Re: Cannot build jogl-2.1.1

elect
This post was updated on .
Sven Gothel wrote
IMHO you should be able to answer this question by your own
given the information (validate compatibility).

We only have tested mingw64 as stated in our Howto.

Maybe you can share what 'codeblocks' even is,
and then present your results of compatibility investigation?

~Sven
Yep, ok, I will try

It is an ide, http://www.codeblocks.org/


Edit: just substituted the paths, it worked ^^
Reply | Threaded
Open this post in threaded view
|

Re: Cannot build jogl-2.1.1

elect
This post was updated on .
I successfully built gluegen and jogl from the command line, but I keep seeing plenty of errors in Netbeans.

Has anyone here successfully built gluegen and jogl in Netbeans?