[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[fluid-dev] Re: fluidsynth and jack on mac: The final link?

From: Ebrahim Mayat
Subject: [fluid-dev] Re: fluidsynth and jack on mac: The final link?
Date: Thu, 11 Mar 2004 17:02:21 +0200

On Mar 10, 2004, at 9:52 PM, Josh Green wrote:

This I believe is incorrect. It shouldn't be -L/usr/local/lib/jack_portaudio.so but just "/usr/local/lib/jack_portaudio.so" and I would remove the "-framework jack" as well. You can test things at the link stage though, without having to recompile everything, see below..
Here is what you should try.. cd to the src/ directory..
Run the above link command "gcc -Wall -O2 ..." but remove the "-L" before "/usr/local/lib/jack_portaudio.so". Make sure there are no new lines in the command if you cut and paste it (I usually cut and paste it to an editor to make sure that its all one line, then paste it back into
a terminal, makes it easier to edit it as well).

Okay, this is what I get

[molgraphics:~/fluidsynth-1.0.3/src] ebrahimm% gcc -Wall -O2 -fomit-frame-pointer -funroll-all-loops -finline-functions -Wall -W -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wcast-align -Wstrict-prototypes -Wno-unused -Winline -framework MidiShare -o fluidsynth fluidsynth-fluidsynth.o libfluidsynth.la -lpthread
ld: libfluidsynth.la bad magic number (not a Mach-O file)
ld: warning prebinding disabled because dependent library: /System/Library/Frameworks/CoreAudio.framework/Versions/A/CoreAudio can't be searched

[molgraphics:~/fluidsynth-1.0.3/src] ebrahimm% gcc -Wall -O2 -fomit-frame-pointer -funroll-all-loops -finline-functions -Wall -W -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wcast-align -Wstrict-prototypes -Wno-unused -Winline -framework MidiShare -o .libs/fluidsynth fluidsynth-fluidsynth.o -L./.libs -L/sw/lib -lfluidsynth -lm -lreadline -lncurses /usr/local/lib/jack_portaudio.so -ldl -lSystem -lpthread ld: /usr/local/lib/jack_portaudio.so is input for the dynamic link editor, is not relocatable by the static link editor again ld: warning prebinding disabled because dependent library: /usr/local/lib/libfluidsynth.1.dylib is not prebound
ld: warning multiple definitions of symbol _BC
/sw/lib/libreadline.dylib(terminal.so) definition of _BC
/sw/lib/libncurses.dylib(lib_termcap.o) definition of _BC
ld: warning multiple definitions of symbol _UP
/sw/lib/libreadline.dylib(terminal.so) definition of _UP
/sw/lib/libncurses.dylib(lib_termcap.o) definition of _UP
ld: warning multiple definitions of symbol _PC
/sw/lib/libreadline.dylib(terminal.so) definition of _PC
/sw/lib/libncurses.dylib(lib_tputs.o) definition of _PC

The "disabled prebinding" problem re-appears. "fluidsynth.la" is actually a script generated by libtool and not an object file (see below).

ebrahimm% more libfluidsynth.la
# libfluidsynth.la - a libtool library file
# Generated by ltmain.sh - GNU libtool 1.4.3 (1.922.2.110 2002/10/23 01:39:54)
# Please DO NOT delete this file!
# It is necessary for linking the library.

# The name that we can dlopen(3).

# Names of this library.
library_names='libfluidsynth.1.0.0.dylib libfluidsynth.1.dylib libfluidsynth.dylib'

# The name of the static archive.

# Libraries that this one depends upon.
dependency_libs=' -L/usr/local/lib -L/sw/lib -L/usr/lib -lm -lreadline -lncurses -ldl -lSystem -lpthread'

# Version information for libfluidsynth.

# Is this an already installed library?

# Files to dlopen/dlpreopen

# Directory that this library needs to be installed in:

I have to convert or use this script to create an object file it seems or at least have some sort of "libfluidsynth" static or dynamic library before linking can progress further. (see the contents of the src directory below.) I am contemplating using the object file link editor "ld" for this. (The man page for "ld" is particularly long.) Any ideas how I could do this?

[~/fluidsynth-1.0.3/src] ebrahimm% ls
Makefile fluid_jack.c fluid_voice.c libfluidsynth_la-fluid_list.o Makefile.am fluid_ladspa.c fluid_voice.h libfluidsynth_la-fluid_mdriver.lo Makefile.bak fluid_ladspa.h fluid_winmidi.c libfluidsynth_la-fluid_mdriver.o Makefile.in fluid_list.c fluidsynth-fluidsynth.o libfluidsynth_la-fluid_midi.lo Makefile2.bak fluid_list.h fluidsynth.c libfluidsynth_la-fluid_midi.o config.h fluid_mdriver.c fluidsynth_priv.h libfluidsynth_la-fluid_midi_router.lo config.h.in fluid_mdriver.h libfluidsynth.la libfluidsynth_la-fluid_midi_router.o config_macos.h fluid_midi.c libfluidsynth_la-fluid_adriver.lo libfluidsynth_la-fluid_midishare.lo config_macosx.h fluid_midi.h libfluidsynth_la-fluid_adriver.o libfluidsynth_la-fluid_midishare.o config_macosx_pb.h fluid_midi_router.c libfluidsynth_la-fluid_alsa.lo libfluidsynth_la-fluid_mod.lo config_win32.h fluid_midi_router.h libfluidsynth_la-fluid_alsa.o libfluidsynth_la-fluid_mod.o fluid_adriver.c fluid_midishare.c libfluidsynth_la-fluid_chan.lo libfluidsynth_la-fluid_oss.lo fluid_adriver.h fluid_mod.c libfluidsynth_la-fluid_chan.o libfluidsynth_la-fluid_oss.o fluid_alsa.c fluid_mod.h libfluidsynth_la-fluid_chorus.lo libfluidsynth_la-fluid_ramsfont.lo fluid_chan.c fluid_oss.c libfluidsynth_la-fluid_chorus.o libfluidsynth_la-fluid_ramsfont.o fluid_chan.h fluid_phase.h libfluidsynth_la-fluid_cmd.lo libfluidsynth_la-fluid_rev.lo fluid_chorus.c fluid_portaudio.c libfluidsynth_la-fluid_cmd.o libfluidsynth_la-fluid_rev.o fluid_chorus.h fluid_ramsfont.c libfluidsynth_la-fluid_conv.lo libfluidsynth_la-fluid_seq.lo fluid_cmd.c fluid_ramsfont.h libfluidsynth_la-fluid_conv.o libfluidsynth_la-fluid_seq.o fluid_cmd.h fluid_rev.c libfluidsynth_la-fluid_coreaudio.lo libfluidsynth_la-fluid_seqbind.lo fluid_conv.c fluid_rev.h libfluidsynth_la-fluid_coreaudio.o libfluidsynth_la-fluid_seqbind.o fluid_conv.h fluid_seq.c libfluidsynth_la-fluid_defsfont.lo libfluidsynth_la-fluid_settings.lo fluid_coreaudio.c fluid_seqbind.c libfluidsynth_la-fluid_defsfont.o libfluidsynth_la-fluid_settings.o fluid_defsfont.c fluid_settings.c libfluidsynth_la-fluid_event.lo libfluidsynth_la-fluid_strtok.lo fluid_defsfont.h fluid_settings.h libfluidsynth_la-fluid_event.o libfluidsynth_la-fluid_strtok.o fluid_dll.c fluid_sfont.h libfluidsynth_la-fluid_gen.lo libfluidsynth_la-fluid_synth.lo fluid_dsound.c fluid_sndmgr.c libfluidsynth_la-fluid_gen.o libfluidsynth_la-fluid_synth.o fluid_dsp_core.c fluid_sse.h libfluidsynth_la-fluid_hash.lo libfluidsynth_la-fluid_sys.lo fluid_event.c fluid_strtok.c libfluidsynth_la-fluid_hash.o libfluidsynth_la-fluid_sys.o fluid_event_priv.h fluid_strtok.h libfluidsynth_la-fluid_io.lo libfluidsynth_la-fluid_tuning.lo fluid_gen.c fluid_synth.c libfluidsynth_la-fluid_io.o libfluidsynth_la-fluid_tuning.o fluid_gen.h fluid_synth.h libfluidsynth_la-fluid_jack.lo libfluidsynth_la-fluid_voice.lo fluid_hash.c fluid_sys.c libfluidsynth_la-fluid_jack.o libfluidsynth_la-fluid_voice.o fluid_hash.h fluid_sys.h libfluidsynth_la-fluid_ladspa.lo stamp-h1 fluid_io.c fluid_tuning.c libfluidsynth_la-fluid_ladspa.o fluid_io.h fluid_tuning.h libfluidsynth_la-fluid_list.lo

Its probably normal for the fluid-alsa, fluid-ladspa and fluid-oss object files to be empty, since these drivers don't exist on OS X (well maybe LADSPA does, but you probably don't have it enabled). The fluid-midishare.o on the other hand, should have symbols. Sounds like maybe it is not getting enabled. Does the configure script report that it is enabled?

No, I did not enable neither alsa, ladspa nor oss. On the other hand, according to the configuration summary, MidiShare is enabled (check my e-mail 8th March, 2004). I also noticed that the new version of MidiShare(1.87) no longer includes the "msSynthDriver" which is the fluidsynth driver and the libMidiShare.1.8.6.dylib is no longer present in /usr/lib !!! though the msMidiDriver and msQTDriver fortunately are.:) MidiShare now exists as "/System/Library/Frameworks/MidiShare.framework".

I'd leave that stuff alone for now, and try messing with the link stage, that I described above. The build is really really close. It looks like you just need that thing to link and then you will have yourself a fluidsynth binary.
FluidSynth will likely still work, but you won't be able to sequence it with external programs.

If I could play soundfont files from my MIDI keyboard controller that would be a great place to start. I could leave MidiShare on the back burner for a little while. I guess we'll tackle one problem at a time.

You could still test it though with the command line interface, or get Swami working :) I've had Swami and FluidSynth working together before on Mac OS X (about a year ago), but it was using the CoreAudio driver and sounded like crap (some obscure bug in the FluidSynth CoreAudio driver). Now that you have Jack, things might be improved. Let me know if you would like any assistance getting Swami
built and running.

Will do when the fluidsynth binary is ready.

Best Regards.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]