IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
Problem building Vorbis from source, Shared libraries with MSYS/MinGW
MuncherOfSpleens
post Jun 9 2006, 01:13
Post #1





Group: Members
Posts: 109
Joined: 25-October 05
From: Florida
Member No.: 25360



I cannot build Vorbis (newest versions of aoTuV or Xiph) shared libraries with MinGW (using configure). Ogg compiles perfectly. I type "./configure" in MSYS; everything seems to work fine. I type "make," and it works perfectly for a while until I get to this:
CODE
gcc -shared  .libs/vorbisfile.o  -L/mingw/lib ./.libs/libvorbis.dll.a  -o .libs/libvorbisfile-3.dll -W1,--image-base=0x10000000 -W1,--out-implib,.libs/libvorbisfile.dll.a
Creating library file: .libs/libvorbisfile.dll.a
.libs/vorbisfile.o:vorbisfile.c:(.text+0x73): undefined reference to `ogg_sync_pageseek'
.libs/vorbisfile.o:vorbisfile.c:(.text+0xb8): undefined reference to `ogg_sync_buffer'
.libs/vorbisfile.o:vorbisfile.c:(.text+0xec): undefined reference to `ogg_sync_wrote'
.libs/vorbisfile.o:vorbisfile.c:(.text+0237): undefined reference to `a_lot_of_other_stuff'

Here's the line it should have used:
CODE
gcc -shared  .libs/vorbisfile.o  -L/mingw/lib /mingw/lib/libogg.dll.a ./.libs/libvorbisfile.dll.a ./.libs/libvorbis.dll.a  -o .libs/libvorbisfile-3.dll -W1,--image-base=0x10000000 -W1,--out-implib,.libs/libvorbisfile.dll.a

Does anybody know why it's doing this, or how to fix it?
Go to the top of the page
+Quote Post
HotshotGG
post Jun 9 2006, 01:31
Post #2





Group: Members
Posts: 1593
Joined: 24-March 02
From: Revere, MA
Member No.: 1607



QUOTE
Does anybody know why it's doing this, or how to fix it?


I am not sure how to fix the problem correctly by editing the compile line, but try this. Make sure you have included the proper header files or make sure the library is sharing the proper header files (in your .libs dir, etc). An undefined reference usually occurs in programming due to the fact that function name is usually mispelled. C is case sensetive. Linker can't find the function (the compiler appears to be skipping libogg for some reason). How this relates to that I am really not sure. ogg_ routines are used for writing vorbis packets in and out of an ogg container. Vorbisfile.c is trying to call another function in libogg, but it can't because it's not there. Hopefully I have at least provided some insight for you. I am sure somebody else know's exactly what the problem is. I have never seen DLL's compiled before.

This post has been edited by HotshotGG: Jun 9 2006, 01:48


--------------------
College student/IT Assistant
Go to the top of the page
+Quote Post
gameplaya15143
post Dec 16 2006, 03:54
Post #3





Group: Members
Posts: 484
Joined: 8-January 06
From: Earth
Member No.: 26978



I just ran into the same problem. I got libogg1.1.3 compiled and installed. I can get through ./configure ok, but when I try to 'make' it...
CODE
make[3]: Entering directory `/home/game/aotuv-b5_20061024/lib'
/bin/sh ../libtool --tag=CC --mode=link gcc  -O20 -D__NO_MATH_INLINES -fsigned-char  -DUSE_MEMORY_H   -o libvorbisfile.la -rpath /usr/local/lib -no-undefined -version-info 4:1:1 vorbisfile.lo libvorbis.la
libtool: link: warning: `/mingw/lib//libogg.la' seems to be moved
rm -fr  .libs/libvorbisfile.dll.a
gcc -shared  .libs/vorbisfile.o  -L/mingw/lib/ ./.libs/libvorbis.dll.a  -o .libs/libvorbisfile-3.dll -Wl,--image-base=0x10000000 -Wl,--out-implib,.libs/libvorbisfile.dll.a
Creating library file: .libs/libvorbisfile.dll.a
.libs/vorbisfile.o(.text+0x73):vorbisfile.c: undefined reference to `ogg_sync_pageseek'
... and so on with the undefined references..

I looked in mingw/lib/ for libogg.la and it IS in there huh.gif (and I do wonder what the "//" means) My guess is that the libtool: link: warning is the whole problem. I don't know how to go about fixing this issue though.

I have been searching for a while for a solution for this, with no luck. Any ideas?


--------------------
Vorbis-q0-lowpass99
lame3.93.1-q5-V9-k-nspsytune
Go to the top of the page
+Quote Post
Aoyumi
post Dec 17 2006, 15:59
Post #4





Group: Members
Posts: 236
Joined: 14-January 04
From: Kanto, Japan
Member No.: 11215



When compile of the latest libvorbis (aoTuV is included) goes wrong by MSYS, please edit makefile in the "lib" directory like the following examples after "./configure."
I can do compile in this change.

CODE
LIBS =
~
OGG_LIBS = -L/usr/local/lib -logg

CODE
LIBS = -L/usr/local/lib -logg
~
OGG_LIBS = -L/usr/local/lib -logg
Go to the top of the page
+Quote Post
gameplaya15143
post Dec 18 2006, 23:41
Post #5





Group: Members
Posts: 484
Joined: 8-January 06
From: Earth
Member No.: 26978



Thank you Aoyumi. I'll give that a try when I get home tonight smile.gif


--------------------
Vorbis-q0-lowpass99
lame3.93.1-q5-V9-k-nspsytune
Go to the top of the page
+Quote Post
gameplaya15143
post Dec 25 2006, 21:11
Post #6





Group: Members
Posts: 484
Joined: 8-January 06
From: Earth
Member No.: 26978



Well, I got libvorbis to compile. But I still don't know how to build vorbis.dll I thought it would be built automatically, but I guess not.

I've spent the last few days looking for clues on how to build it with gcc, but have found nothing (everything just seems to say to use the msvc project files).

Any help would be greatly appreciated.


--------------------
Vorbis-q0-lowpass99
lame3.93.1-q5-V9-k-nspsytune
Go to the top of the page
+Quote Post
Aoyumi
post Jan 3 2007, 05:50
Post #7





Group: Members
Posts: 236
Joined: 14-January 04
From: Kanto, Japan
Member No.: 11215



QUOTE (gameplaya15143 @ Dec 26 2006, 05:11) *
Well, I got libvorbis to compile. But I still don't know how to build vorbis.dll I thought it would be built automatically, but I guess not.

I've spent the last few days looking for clues on how to build it with gcc, but have found nothing (everything just seems to say to use the msvc project files).

Any help would be greatly appreciated.

I recommend you to use dllwrap. This can create dll for Windows easily.

example(ogg)
CODE
cd \libogg\src\.libs
    dllwrap.exe -def \libogg\win32\ogg.def --implib oggw.dll.a bitwise.o framing.o -o ogg.dll

example(vorbis)
CODE
cd \libvorbis\lib\.libs
    dllwrap.exe -def \libvorbis\win32\vorbis.def --implib vorbisw.dll.a oggw.dll.a analysis.o bitrate.o...(the same) -o vorbis.dll

In order to perform the above-mentioned sample, please prepare a required file in advance.

This post has been edited by Aoyumi: Jan 3 2007, 06:58
Go to the top of the page
+Quote Post
gameplaya15143
post Jan 16 2007, 02:55
Post #8





Group: Members
Posts: 484
Joined: 8-January 06
From: Earth
Member No.: 26978



[sarcasm]Wow that wasn't hard at all![/sarcasm] headbang.gif

I just finally got vorbis.dll compiled a few minutes ago. Thank you Aoyumi for your help. (oggw.dll.a and vorbisw.dll.a are cygwin things aren't they? I never had any luck with cygwin). What I ended up doing was slightly different, but is working just fine with oddcast3 happy.gif

From inside "libogg-1.1.3\src\.libs" to build ogg.dll I ran:
CODE
dllwrap -def ../../win32/ogg.def --implib libogg.dll.a bitwise.o framing.o -o ogg.dll


To make things easy on myself, I then copied libogg.dll.a bitwise.o and framing.o to the vorbis .libs directory.

From inside "aotuv-b5_20061024\lib\.libs" to build vorbis.dll I ran:
CODE
dllwrap -def ../../win32/vorbis.def -implib libvorbis.dll.a libogg.dll.a *.o
libvorbisfile.dll.a -o vorbis.dll


biggrin.gif


--------------------
Vorbis-q0-lowpass99
lame3.93.1-q5-V9-k-nspsytune
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 24th July 2014 - 15:10