Ticket #63 (closed defect: fixed)

Opened 3 years ago

Last modified 1 year ago

Compile libtritonus for Win32/cygwin

Reported by: alban@tryphon.org Assigned to: alban@tryphon.org
Priority: normal Milestone: 20060515
Component: default Version: unspecified
Severity: normal Keywords:
Cc: tim@tryphon.org, fx.poignart@gmail.com, aroth@bigtribe.com

Description

To enable the distribution of PlaylistEncoderReceiver (Bug 61), we must create win32 binaries for libtritonus. 

During the tests, we should study how to package libvorbis (to make possible the dynamic loading)

Attachments

Change History

12/12/05 12:32:09 changed by alban@tryphon.org

  • status changed from new to assigned.
I'm preparing a small source distribution of the tritonus native sources and java classes.

12/12/05 18:32:40 changed by alban@tryphon.org

To make things harder, I extracted needed tritonus sources and created a full-ant script.

To build tritonus libraries, do:

svn co http://svn.tryphon.org/kolaka/freecast/trunk/track/tritonus/patches/0.3.6 tritonus
cd tritonus
ant

01/18/06 11:10:36 changed by alban@tryphon.org

  • blocked set to 64.

01/18/06 11:14:28 changed by alban@tryphon.org

  • blocked deleted.

01/18/06 11:15:07 changed by alban@tryphon.org

  • cc set to tim@tryphon.org.

03/21/06 00:26:25 changed by alban@tryphon.org

  • blocked deleted.

03/28/06 09:22:50 changed by alban@tryphon.org

After several dozen hours, a tritonusvorbis.dll has been compiled and succesfully tested. It requires a cygwin environment and several steps which includes the libogg and libvorbis compilations from sources.

The three dlls will be submitted into subversion to allow the first freecast tests. The complete patch of track/tritonus must be refactored to be compatible between linux and win32 platforms.

It creates a problem of PATH configuration under Windows, because the ogg and vorbis must be found in the JVM PATH .. java.library.path is no longer enough. To be checked under a JavaWebStart environment :/

04/24/06 00:18:07 changed by alban@tryphon.org

  • status changed from assigned to closed.
  • resolution set to fixed.
successfully tested under Windows with a FreeCast Manager

05/25/06 19:42:52 changed by alban@tryphon.org

  • milestone changed from next to 20060515.
released into 20060515

05/30/06 04:14:02 changed by aroth@bigtribe.com

  • cc set to aroth@bigtribe.com.
Hi, I'm trying to get vorbis support w/ java under windows as well, and stumbled across this bug report.  I noticed that there is a compiled version of the tritonus .dll file in SVN, but when I try to run using that DLL file, my application/encoder just hangs.  I've tried a number of different combinations, from using the .dll with the tritonus JAR files available on their website (i.e. the tritonus_share and javalayer JAR's) to ones that I've built myself after checking out their source code, to the ones in your SVN repo, and I've tried using the tritonus_vorbis JAR that I built myself, as well as the one that's in your repository, but the behavior is always the same.

What I'm trying to do now is get your patch to build, as per the instructions you give in post #2, but when I run 'ant' to build the project I get *tons* of compilation errors...stuff like (and sorry for the length, I just wanted to show the 3 basic types of errors it reports):

       [cc] C:/dev/jdk/include/jni.h:680: error: parse error before '*' token
       [cc] C:/dev/jdk/include/jni.h:682: error: parse error before '*' token
       [cc] C:/dev/jdk/include/jni.h:684: error: parse error before '*' token
       [cc] C:/dev/jdk/include/jni.h:686: error: parse error before '*' token
       [cc] C:/dev/jdk/include/jni.h:688: error: parse error before '*' token
       [cc] C:/dev/jdk/include/jni.h:690: error: parse error before '*' token
       [cc] C:/dev/jdk/include/jni.h:693: error: parse error before '*' token
       [cc] C:/dev/jdk/include/jni.h:695: error: parse error before "jint"
       [cc] C:/dev/jdk/include/jni.h:695: error: `jint' declared as function returning a function
       [cc] C:/dev/jdk/include/jni.h:695: warning: data definition has no type or storage class
       [cc] C:/dev/jdk/include/jni.h:696: error: parse error before '*' token
       [cc] C:/dev/jdk/include/jni.h:697: error: `jint' declared as function returning a function
       [cc] C:/dev/jdk/include/jni.h:697: warning: data definition has no type or storage class
       [cc] C:/dev/jdk/include/jni.h:699: error: parse error before '*' token
       [cc] C:/dev/jdk/include/jni.h:700: error: `jint' declared as function returning a function
       [cc] C:/dev/jdk/include/jni.h:700: warning: data definition has no type or storage class
       [cc] C:/dev/jdk/include/jni.h:701: error: parse error before '*' token
       [cc] C:/dev/jdk/include/jni.h:702: error: `jint' declared as function returning a function
       [cc] C:/dev/jdk/include/jni.h:702: warning: data definition has no type or storage class
       [cc] C:/dev/jdk/include/jni.h:704: error: parse error before '*' token
       [cc] C:/dev/jdk/include/jni.h:705: error: `jint' declared as function returning a function
       [cc] C:/dev/jdk/include/jni.h:705: warning: data definition has no type or storage class
       [cc] C:/dev/jdk/include/jni.h:707: error: parse error before '*' token
       [cc] C:/dev/jdk/include/jni.h:709: error: parse error before '*' token
       [cc] C:/dev/jdk/include/jni.h:712: error: parse error before '*' token
       [cc] C:/dev/jdk/include/jni.h:714: error: parse error before '*' token
       [cc] C:/dev/jdk/include/jni.h:717: error: parse error before '*' token
       [cc] C:/dev/jdk/include/jni.h:719: error: parse error before '*' token
       [cc] C:/dev/jdk/include/jni.h:722: error: parse error before '*' token
       [cc] C:/dev/jdk/include/jni.h:724: error: parse error before '*' token
       [cc] C:/dev/jdk/include/jni.h:727: error: parse error before '*' token
       [cc] C:/dev/jdk/include/jni.h:730: error: parse error before '*' token
       [cc] C:/dev/jdk/include/jni.h:732: error: parse error before '*' token
       [cc] C:/dev/jdk/include/jni.h:734: error: parse error before '*' token
       [cc] C:/dev/jdk/include/jni.h:735: error: `jlong' declared as function returning a function
       [cc] C:/dev/jdk/include/jni.h:735: warning: data definition has no type or storage class
       [cc] C:/dev/jdk/include/jni.h:736: error: parse error before '}' token
       [cc] C:/dev/jdk/include/jni.h:1834: error: parse error before "jint"
       [cc] C:/dev/jdk/include/jni.h:1834: warning: no semicolon at end of struct or union
       [cc] C:/dev/jdk/include/jni.h:1836: warning: data definition has no type or storage class
       [cc] C:/dev/jdk/include/jni.h:1839: error: parse error before '}' token
       [cc] C:/dev/jdk/include/jni.h:1839: warning: data definition has no type or storage class
       [cc] C:/dev/jdk/include/jni.h:1842: error: parse error before "jint"
       [cc] C:/dev/jdk/include/jni.h:1842: warning: no semicolon at end of struct or union
       [cc] C:/dev/jdk/include/jni.h:1846: error: parse error before '}' token
       [cc] C:/dev/jdk/include/jni.h:1846: warning: data definition has no type or storage class
       [cc] C:/dev/jdk/include/jni.h:1851: error: parse error before "jint"
       [cc] C:/dev/jdk/include/jni.h:1851: warning: no semicolon at end of struct or union
       [cc] C:/dev/jdk/include/jni.h:1854: error: parse error before "checkSource"
       [cc] C:/dev/jdk/include/jni.h:1854: warning: data definition has no type or storage class
       [cc] C:/dev/jdk/include/jni.h:1855: error: parse error before "nativeStackSize"
       [cc] C:/dev/jdk/include/jni.h:1855: warning: data definition has no type or storage class
       [cc] C:/dev/jdk/include/jni.h:1856: error: parse error before "javaStackSize"
       [cc] C:/dev/jdk/include/jni.h:1856: warning: data definition has no type or storage class
       [cc] C:/dev/jdk/include/jni.h:1857: error: parse error before "minHeapSize"
       [cc] C:/dev/jdk/include/jni.h:1857: warning: data definition has no type or storage class
       [cc] C:/dev/jdk/include/jni.h:1858: error: parse error before "maxHeapSize"
       [cc] C:/dev/jdk/include/jni.h:1858: warning: data definition has no type or storage class
       [cc] C:/dev/jdk/include/jni.h:1859: error: parse error before "verifyMode"
       [cc] C:/dev/jdk/include/jni.h:1859: warning: data definition has no type or storage class
       [cc] C:/dev/jdk/include/jni.h:1862: error: parse error before '*' token
       [cc] C:/dev/jdk/include/jni.h:1862: error: `jint' declared as function returning a function
       [cc] C:/dev/jdk/include/jni.h:1862: warning: data definition has no type or storage class
       [cc] C:/dev/jdk/include/jni.h:1863: error: parse error before '*' token
       [cc] C:/dev/jdk/include/jni.h:1864: error: parse error before '*' token
       [cc] C:/dev/jdk/include/jni.h:1866: warning: data definition has no type or storage class
       [cc] C:/dev/jdk/include/jni.h:1867: error: parse error before "enableVerboseGC"
       [cc] C:/dev/jdk/include/jni.h:1867: warning: data definition has no type or storage class
       [cc] C:/dev/jdk/include/jni.h:1868: error: parse error before "disableAsyncGC"
       [cc] C:/dev/jdk/include/jni.h:1868: warning: data definition has no type or storage class
       [cc] C:/dev/jdk/include/jni.h:1869: error: parse error before "verbose"
       [cc] C:/dev/jdk/include/jni.h:1869: warning: data definition has no type or storage class
       [cc] C:/dev/jdk/include/jni.h:1871: error: parse error before "debugPort"
       [cc] C:/dev/jdk/include/jni.h:1871: warning: data definition has no type or storage class
       [cc] C:/dev/jdk/include/jni.h:1872: warning: data definition has no type or storage class
       [cc] C:/dev/jdk/include/jni.h:1888: error: parse error before "jint"
       [cc] C:/dev/jdk/include/jni.h:1888: warning: no semicolon at end of struct or union
       [cc] C:/dev/jdk/include/jni.h:1890: error: parse error before '*' token
       [cc] C:/dev/jdk/include/jni.h:1890: error: `jint' declared as function returning a function
       [cc] C:/dev/jdk/include/jni.h:1890: warning: data definition has no type or storage class
       [cc] C:/dev/jdk/include/jni.h:1892: error: parse error before '*' token
       [cc] C:/dev/jdk/include/jni.h:1892: error: `jint' declared as function returning a function
       [cc] C:/dev/jdk/include/jni.h:1892: warning: data definition has no type or storage class
       [cc] C:/dev/jdk/include/jni.h:1894: error: parse error before '*' token
       [cc] C:/dev/jdk/include/jni.h:1894: error: parse error before "jint"
       [cc] C:/dev/jdk/include/jni.h:1894: error: `jint' declared as function returning a function
       [cc] C:/dev/jdk/include/jni.h:1894: warning: data definition has no type or storage class
       [cc] C:/dev/jdk/include/jni.h:1896: error: parse error before '*' token
       [cc] C:/dev/jdk/include/jni.h:1896: error: `jint' declared as function returning a function
       [cc] C:/dev/jdk/include/jni.h:1896: warning: data definition has no type or storage class
       [cc] C:/dev/jdk/include/jni.h:1897: error: parse error before '}' token
       [cc] C:/dev/jdk/include/jni.h:1927: error: parse error before "jint"
       [cc] C:/dev/jdk/include/jni.h:1928: warning: data definition has no type or storage class
       [cc] C:/dev/jdk/include/jni.h:1930: error: parse error before "jint"
       [cc] C:/dev/jdk/include/jni.h:1931: warning: data definition has no type or storage class
       [cc] C:/dev/jdk/include/jni.h:1933: error: parse error before "jint"
       [cc] C:/dev/jdk/include/jni.h:1934: error: parse error before "jsize"
       [cc] C:/dev/jdk/include/jni.h:1934: warning: data definition has no type or storage class
       [cc] C:/dev/jdk/include/jni.h:1937: error: parse error before "jint"
       [cc] C:/dev/jdk/include/jni.h:1938: warning: data definition has no type or storage class
       [cc] C:/dev/jdk/include/jni.h:1940: error: syntax error before "void"
       [cc] C:/dev/jdk/include/jni.h:1941: warning: data definition has no type or storage class
       [cc] In file included from C:\dev\eclipse\workspace\trit-vorbis\build\natives\vorbis\org_tritonus_lowlevel_ogg_Pa
ge.c:28:
       [cc] C:\dev\eclipse\workspace\trit-vorbis\build\natives\vorbis\/org_tritonus_lowlevel_ogg_Page.h:15: error: parse
 error before "jint"
       [cc] C:\dev\eclipse\workspace\trit-vorbis\build\natives\vorbis\/org_tritonus_lowlevel_ogg_Page.h:16: warning: dat
a definition has no type or storage class
       [cc] C:\dev\eclipse\workspace\trit-vorbis\build\natives\vorbis\/org_tritonus_lowlevel_ogg_Page.h:23: error: synta
x error before "void"
       [cc] C:\dev\eclipse\workspace\trit-vorbis\build\natives\vorbis\/org_tritonus_lowlevel_ogg_Page.h:24: warning: dat
a definition has no type or storage class
       [cc] C:\dev\eclipse\workspace\trit-vorbis\build\natives\vorbis\/org_tritonus_lowlevel_ogg_Page.h:31: error: parse
 error before "jint"
       [cc] C:\dev\eclipse\workspace\trit-vorbis\build\natives\vorbis\/org_tritonus_lowlevel_ogg_Page.h:32: warning: dat
a definition has no type or storage class   

...is there a special version of 'cc' that I need to install, or anything else that I might be able to tweak to get the build to work?

If it's of any help, I am running:

Windows XP Pro w/ SP2
2 GB RAM
Core Duo T2500
Java 1.5.0_06
Ant 1.6.5
(not sure how to check my 'cc' version, it's probably the one that comes with 'vctoolkit2003')

Anyways, any assistance would be much appreciated.  Sorry if I'm not supposed to be on your bugzilla...though it is pretty publicly accessible.

05/30/06 04:51:38 changed by aroth@bigtribe.com

Okay, figured out that issue, I had to edit the buildfile to specify the 'mscv' compiler because gcc was being used by default.  Also updated some of the 'include' references to reflect my local fileststem.  Now the stuff compiles, but I'm getting a link error:

build.natives:
       [cc] 10 total files to be compiled.
       [cc] org_tritonus_lowlevel_ogg_Packet.c
       [cc] common.c
       [cc] org_tritonus_lowlevel_vorbis_Info.c
       [cc] org_tritonus_lowlevel_ogg_StreamState.c
       [cc] org_tritonus_lowlevel_ogg_SyncState.c
       [cc] org_tritonus_lowlevel_vorbis_Comment.c
       [cc] org_tritonus_lowlevel_vorbis_Block.c
       [cc] org_tritonus_lowlevel_vorbis_DspState.c
       [cc] org_tritonus_lowlevel_ogg_Page.c
       [cc] Generating Code...
       [cc] org_tritonus_lowlevel_ogg_Buffer.c
       [cc] Starting link
       [cc] link: extra operand `/DLL'
       [cc] Try `link --help' for more information.

...so I've got the .obj files, but no completed .dll.  Any suggestions?

05/30/06 06:23:44 changed by aroth@bigtribe.com

Linkage problem fixed, the system was using the cygwin linker (like it had been trying to use the cygwin gcc compiler), switching to the MS variant fixed the problem, now the last issue seems to be the ogg/vorbis/vorbisenc libraries that are needed for the last stage of the linking process.  I now get:

       ...
       [cc] org_tritonus_lowlevel_ogg_Buffer.obj : error LNK2019: unresolved external symbol _oggpack_get_buffer referen
ced in function _Java_org_tritonus_lowlevel_ogg_Buffer_getBuffer@8
       [cc] tritonusvorbis.dll : fatal error LNK1120: 73 unresolved externals

I thought that this was what the /lib/win32/*.dll files were for, but those don't seem to be helping any, even when I manually say to include them in the build script.  I guess I could just get the vorbis library sources, and build the libraries myself, though is there anywhere where I can get precompiled win32 versions of these libraries?  Trying to get one to build is bad enough, so I'd rather not end up shooting for all 4...

05/30/06 09:28:55 changed by alban@tryphon.org

The freecast subversion contains a win32 tritonus dll which works fine (http://svn.tryphon.org/kolaka/freecast/trunk/track/tritonus/patches/0.3.6/tritonusvorbis.dll). 

You need to include in the path the ogg and vorbis dll provided here: http://svn.tryphon.org/kolaka/freecast/trunk/track/tritonus/patches/0.3.6/lib/win32/

The three dll are compiled with gcc with mingw runtime libraries. The build files in subversion are not uptodate. I need to complete the ant script to allow a complete build for linux and win32.

05/30/06 09:56:15 changed by aroth@bigtribe.com

Thanks, I had just managed to figure that all out.  I built the missing libraries from sources, threw them in the correct /lib directory, made a number of other changes that I don't really remember in order to get the build going correctly, got stuff built, put the finished product into the right place, and can now transcode to ogg.  Awesome.

Oddly enough, I had to use the tritonusvorbis.dll contained in the SVN repo alongside the tritonus_vorbis.jar that I built locally and the "official" tritonus_share.jar in order to make things work.  If I tried to use the JAR files on the SVN repo, vorbis would not show up as an available encoding option (tested using the jsresources.org AudioConverter).

I may be back later to document the necessary steps for anyone else who happens
to stumble across this thread.  If I knew anything more than the basics of build scripting I'd offer to help out there, since this proved to be an extremely helpful resource (and pretty much the only one I was able to find).  Very cool that you got all this to work and put it in a public SVN repo.

05/30/06 10:08:01 changed by alban@tryphon.org

in FreeCast we're using the Ogg Vorbis encoder via the tritonus API and not the Java Sound API. So we didn't test the vorbis encoder provider. I don't know if the class exists ..

11/27/07 19:15:58 changed by alban

  • priority changed from high to normal.

Add/Change #63 (Compile libtritonus for Win32/cygwin)




Change Properties
Action