Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error while loading shared libraries #388

Closed
GeoffreyPlitt opened this issue May 27, 2018 · 5 comments
Closed

error while loading shared libraries #388

GeoffreyPlitt opened this issue May 27, 2018 · 5 comments

Comments

@GeoffreyPlitt
Copy link

Building on Raspberry Pi (arm).

Did cmake.

"sudo make install" looks good:

make install
 ---> Running in 05e55c5ff22c
Scanning dependencies of target libfluidsynth
[  2%] Building C object src/CMakeFiles/libfluidsynth.dir/drivers/fluid_oss.c.o
[  4%] Building C object src/CMakeFiles/libfluidsynth.dir/utils/fluid_conv.c.o
[  7%] Building C object src/CMakeFiles/libfluidsynth.dir/utils/fluid_hash.c.o
[  9%] Building C object src/CMakeFiles/libfluidsynth.dir/utils/fluid_list.c.o
[ 11%] Building C object src/CMakeFiles/libfluidsynth.dir/utils/fluid_ringbuffer.c.o
[ 14%] Building C object src/CMakeFiles/libfluidsynth.dir/utils/fluid_settings.c.o
[ 16%] Building C object src/CMakeFiles/libfluidsynth.dir/utils/fluid_sys.c.o
[ 19%] Building C object src/CMakeFiles/libfluidsynth.dir/sfloader/fluid_defsfont.c.o
[ 21%] Building C object src/CMakeFiles/libfluidsynth.dir/sfloader/fluid_ramsfont.c.o
[ 23%] Building C object src/CMakeFiles/libfluidsynth.dir/sfloader/fluid_sfont.c.o
[ 26%] Building C object src/CMakeFiles/libfluidsynth.dir/sfloader/fluid_sffile.c.o
/fluidsynth-2.0.0.beta1/src/sfloader/fluid_sffile.c: In function ‘chunkid’:
/fluidsynth-2.0.0.beta1/src/sfloader/fluid_sffile.c:478:9: warning: cast increases required alignment of target type [-Wcast-align]
     p = (unsigned int *)&idlist;
         ^
[ 28%] Building C object src/CMakeFiles/libfluidsynth.dir/sfloader/fluid_samplecache.c.o
[ 30%] Building C object src/CMakeFiles/libfluidsynth.dir/rvoice/fluid_adsr_env.c.o
[ 33%] Building C object src/CMakeFiles/libfluidsynth.dir/rvoice/fluid_chorus.c.o
[ 35%] Building C object src/CMakeFiles/libfluidsynth.dir/rvoice/fluid_iir_filter.c.o
[ 38%] Building C object src/CMakeFiles/libfluidsynth.dir/rvoice/fluid_lfo.c.o
[ 40%] Building C object src/CMakeFiles/libfluidsynth.dir/rvoice/fluid_rvoice.c.o
[ 42%] Building C object src/CMakeFiles/libfluidsynth.dir/rvoice/fluid_rvoice_dsp.c.o
[ 45%] Building C object src/CMakeFiles/libfluidsynth.dir/rvoice/fluid_rvoice_event.c.o
[ 47%] Building C object src/CMakeFiles/libfluidsynth.dir/rvoice/fluid_rvoice_mixer.c.o
[ 50%] Building C object src/CMakeFiles/libfluidsynth.dir/rvoice/fluid_rev.c.o
[ 52%] Building C object src/CMakeFiles/libfluidsynth.dir/synth/fluid_chan.c.o
[ 54%] Building C object src/CMakeFiles/libfluidsynth.dir/synth/fluid_event.c.o
[ 57%] Building C object src/CMakeFiles/libfluidsynth.dir/synth/fluid_gen.c.o
[ 59%] Building C object src/CMakeFiles/libfluidsynth.dir/synth/fluid_mod.c.o
[ 61%] Building C object src/CMakeFiles/libfluidsynth.dir/synth/fluid_synth.c.o
[ 64%] Building C object src/CMakeFiles/libfluidsynth.dir/synth/fluid_synth_monopoly.c.o
[ 66%] Building C object src/CMakeFiles/libfluidsynth.dir/synth/fluid_tuning.c.o
[ 69%] Building C object src/CMakeFiles/libfluidsynth.dir/synth/fluid_voice.c.o
[ 71%] Building C object src/CMakeFiles/libfluidsynth.dir/midi/fluid_midi.c.o
[ 73%] Building C object src/CMakeFiles/libfluidsynth.dir/midi/fluid_midi_router.c.o
[ 76%] Building C object src/CMakeFiles/libfluidsynth.dir/midi/fluid_seqbind.c.o
[ 78%] Building C object src/CMakeFiles/libfluidsynth.dir/midi/fluid_seq.c.o
[ 80%] Building C object src/CMakeFiles/libfluidsynth.dir/drivers/fluid_adriver.c.o
[ 83%] Building C object src/CMakeFiles/libfluidsynth.dir/drivers/fluid_mdriver.c.o
[ 85%] Building C object src/CMakeFiles/libfluidsynth.dir/drivers/fluid_aufile.c.o
/fluidsynth-2.0.0.beta1/src/drivers/fluid_aufile.c: In function ‘delete_fluid_file_audio_driver’:
/fluidsynth-2.0.0.beta1/src/drivers/fluid_aufile.c:103:35: warning: cast increases required alignment of target type [-Wcast-align]
  fluid_file_audio_driver_t* dev = (fluid_file_audio_driver_t*) p;
                                   ^
[ 88%] Building C object src/CMakeFiles/libfluidsynth.dir/bindings/fluid_cmd.c.o
[ 90%] Building C object src/CMakeFiles/libfluidsynth.dir/bindings/fluid_filerenderer.c.o
[ 92%] Building C object src/CMakeFiles/libfluidsynth.dir/bindings/fluid_ladspa.c.o
[ 95%] Linking C shared library libfluidsynth.so
[ 95%] Built target libfluidsynth
Scanning dependencies of target fluidsynth
[ 97%] Building C object src/CMakeFiles/fluidsynth.dir/fluidsynth.c.o
[100%] Linking C executable fluidsynth
[100%] Built target fluidsynth
Install the project...
-- Install configuration: "RelWithDebInfo"
-- Installing: /usr/local/lib/pkgconfig/fluidsynth.pc
-- Installing: /usr/local/bin/fluidsynth
-- Set runtime path of "/usr/local/bin/fluidsynth" to ""
-- Installing: /usr/local/lib/libfluidsynth.so.2.0.0
-- Installing: /usr/local/lib/libfluidsynth.so.2
-- Installing: /usr/local/lib/libfluidsynth.so
-- Installing: /usr/local/include/fluidsynth/audio.h
-- Installing: /usr/local/include/fluidsynth/event.h
-- Installing: /usr/local/include/fluidsynth/gen.h
-- Installing: /usr/local/include/fluidsynth/ladspa.h
-- Installing: /usr/local/include/fluidsynth/log.h
-- Installing: /usr/local/include/fluidsynth/midi.h
-- Installing: /usr/local/include/fluidsynth/misc.h
-- Installing: /usr/local/include/fluidsynth/mod.h
-- Installing: /usr/local/include/fluidsynth/ramsfont.h
-- Installing: /usr/local/include/fluidsynth/seq.h
-- Installing: /usr/local/include/fluidsynth/seqbind.h
-- Installing: /usr/local/include/fluidsynth/settings.h
-- Installing: /usr/local/include/fluidsynth/sfont.h
-- Installing: /usr/local/include/fluidsynth/shell.h
-- Installing: /usr/local/include/fluidsynth/synth.h
-- Installing: /usr/local/include/fluidsynth/types.h
-- Installing: /usr/local/include/fluidsynth/voice.h
-- Installing: /usr/local/include/fluidsynth/version.h
-- Installing: /usr/local/include/fluidsynth.h
-- Installing: /usr/local/share/man/man1/fluidsynth.1

But when I run "fluidsynth", I get linking errors:

fluidsynth: error while loading shared libraries: libfluidsynth.so.2: cannot open shared object file: No such file or directory

@derselbst
Copy link
Member

A first guess would be that /usr/local/lib/ is not in your linker path. Try

LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH fluidsynth

@derselbst
Copy link
Member

@GeoffreyPlitt
Copy link
Author

LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH worked for me, thanks!

@stanelie
Copy link

Same error for me.
I had to do a sudo ldconfig -v to make it work.
Shouldn't a command like that be at the end of the "make install" script?

@derselbst
Copy link
Member

It is usually a bad idea to do more than the user has requested. Also, in this particular case: ldconfig requires root privileges, make install does not necessarily.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants