Duke4.net Forums: ArchLinux 64bit, OGG/FLAC support, won't link executable - Duke4.net Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

ArchLinux 64bit, OGG/FLAC support, won't link executable

User is offline   hungerfish 

#1

Hey,
so I'm having a slight problem with building eduke32 successfully whilst having OGG/FLAC support enabled.
Tested on 5888 and now 5899. Running 64bit Archlinux, I have libvorbis, libogg and flac installed.
The build fails whilst linking:
make

/tmp/cc5Qn8eO.ltrans0.ltrans.o: In function `VM_Execute(int) [clone .lto_priv.802]':
<artificial>;).text+0x7c4): undefined reference to `ov_pcm_seek'
...
/tmp/cc5Qn8eO.ltrans19.ltrans.o: In function `error_flac_stream(FLAC__StreamDecoder const*, FLAC__StreamDecoderErrorStatus, void*)':
<artificial>:D.text+0x18e): undefined reference to `FLAC__StreamDecoderErrorStatusString'
/tmp/cc5Qn8eO.ltrans19.ltrans.o: In function `MV_ReleaseFLACVoice(VoiceNode*)':
<artificial>:(.text+0x2037): undefined reference to `FLAC__stream_decoder_finish'
...
/tmp/cc5Qn8eO.ltrans19.ltrans.o: In function `write_flac_stream(FLAC__StreamDecoder const*, FLAC__Frame const*, int const* const*, void*)':
<artificial>:D.text+0x23c6): undefined reference to `FLAC__stream_decoder_seek_absolute'
/tmp/cc5Qn8eO.ltrans19.ltrans.o: In function `MV_GetNextFLACBlock(VoiceNode*)':
<artificial>:(.text+0x241b): undefined reference to `FLAC__stream_decoder_process_single'
...
/tmp/cc5Qn8eO.ltrans19.ltrans.o: In function `MV_ReleaseVorbisVoice(VoiceNode*)':
<artificial>:(.text+0x2502): undefined reference to `ov_clear'
/tmp/cc5Qn8eO.ltrans19.ltrans.o: In function `MV_GetNextVorbisBlock(VoiceNode*)':
<artificial>:(.text+0x2965): undefined reference to `ov_read'
...
<artificial>:(.text+0x581c): undefined reference to `FLAC__stream_decoder_new'
...
/tmp/cc5Qn8eO.ltrans19.ltrans.o: In function `MV_PlayVorbis':
<artificial>:(.text+0x5f93): undefined reference to `ov_open_callbacks'
...
collect2: error: ld returned 1 exit status
Failed linking eduke32

make HAVE_VORBIS=0 HAVE_FLAC=0

Obviously disables support and linking works fine. As expected the binary then lacks OGG/FLAC support.

As a side note, if I run the eduke32 binary, I get no music playback by default. If I run it with:
SDL_SOUNDFONTS=/path/to/soundfont.sf2 SDL_FORCE_SOUNDFONTS=1 eduke32

Midiplayback works fine, I don't have timidity installed, I use fluidsynth.
If I understand correctly, those variables override the 'built in timidity based player in SDL_mixer'.
Thats nice and all, however its then somewhat 'confusing/misleading' that eduke32's log still says:

Quote

Initializing music...
Error: couldn't open any of the following files:
...timidity stuff
S_MusicStartup(): failed initializing


This is a c++ build by the way (the default), I'm mentioning this because the eduke32 package available on the AUR
explicitly disables c++ with "CPLUSPLUS=0", maybe that makes a difference?
Can't test, because when I disable c++, the build fails during compilation, complaining about unknown types "unknown type name ‘uint32_t’"

Anyhow, I would still like to be able to build and run a binary with working FLAC and OGG support.
I'm guessing that this must be coming from conflicting includes or something from the depths of the Makefile(s)??
This is the linkers commandline (its the same for builds with HAVE_OGG/FLAC and without):
linker: "g++ -fno-exceptions -fno-rtti   -O2  -fno-stack-protector -funswitch-loops -fomit-frame-pointer -flto -funsigned-char -fno-strict-aliasing -fjump-tables
-I/usr/include/SDL2 -D_REENTRANT   -lm -lvpx -lSDL2_mixer -L/usr/lib -lSDL2 -ldl -pthread -lpng -lz "

Clearly its not even trying to link to ogg or vorbis, what's up with that?!

EDIT(WORKAROUND):
So, by going into Makefile.common, line286
I forced the issue: "LIBS=-lm -lFLAC -lvorbisfile -lvorbis -logg"
and "make" builds fine and I can playback oggs (haven't tried flac).

Is this a bug in the Makefile maybe with the platform/subplatform stuff??

This post has been edited by hungerfish: 19 October 2016 - 07:26 AM

0

User is online   Hendricks266 

  • Weaponized Autism

  #2

Weird,

ifeq ($(SUBPLATFORM),LINUX)
    LIBS += -lFLAC -lvorbisfile -lvorbis -logg
endif


should take care of it.

Can you add

$(warning $(PLATFORM) , $(SUBPLATFORM))


to that position in the Makefile and tell me what it says?
0

User is offline   hungerfish 

#3

Makefile:473: linux ,

That's from immediately above the ifeq.
What's this 'SUBPLATFORM' thing anyway? It's obviously not defined for me, checking 'env' I can confirm 'PLATFORM=linux', but no subplatform...

Also, I changed the ifeq to just check PLATFORM instead, but that still doesn't add the libs to the linker.. and even stranger, when I do "SUBPLATFORM=linux make", resulting in
Makefile:473: linux , linux

the ifeq still does not evaluate to TRUE thus not adding the libs...
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic


All copyrights and trademarks not owned by Voidpoint, LLC are the sole property of their respective owners. Play Ion Fury! ;) © Voidpoint, LLC

Enter your sign in name and password


Sign in options