Opened 11 years ago

Closed 11 years ago

#522 closed Bug Report (invalid)

Compiling problem, undefined reference to snd_seq_open

Reported by: joeseggiola@… Owned by: David Robillard
Priority: major Component: Patchage
Keywords: Cc:

Description

When I try to compile the from the SVN repository, ./waf configure it's ALL ok, but ./waf give me these errors:

[15/17] cxx: src/AlsaDriver.cpp -> build/default/src/AlsaDriver_1.o
[16/17] copy: patchage.desktop.in -> build/default/patchage.desktop
[17/17] cxx_link: build/default/src/LashClient_1.o build/default/src/Patchage_1.o build/default/src/PatchageCanvas_1.o build/default/src/PatchageEvent_1.o build/default/src/StateManager_1.o build/default/src/main_1.o build/default/src/LashProxy_1.o build/default/src/LoadProjectDialog_1.o build/default/src/Project_1.o build/default/src/ProjectList_1.o build/default/src/ProjectPropertiesDialog_1.o build/default/src/Session_1.o build/default/src/DBus_1.o build/default/src/JackDriver_1.o build/default/src/AlsaDriver_1.o -> build/default/patchage
default/src/AlsaDriver_1.o: In function `AlsaDriver::attach(bool)':
AlsaDriver.cpp:(.text+0x23d): undefined reference to `snd_seq_open'
AlsaDriver.cpp:(.text+0x35e): undefined reference to `snd_seq_set_client_name'
default/src/AlsaDriver_1.o: In function `AlsaDriver::detach()':
AlsaDriver.cpp:(.text+0x46e): undefined reference to `snd_seq_close'
default/src/AlsaDriver_1.o: In function `AlsaDriver::create_port_view_internal(Patchage*, snd_seq_addr, boost::shared_ptr<PatchageModule>&, boost::shared_ptr<PatchagePort>&)':
AlsaDriver.cpp:(.text+0x8bf): undefined reference to `snd_seq_client_info_sizeof'
AlsaDriver.cpp:(.text+0x8e2): undefined reference to `snd_seq_client_info_sizeof'
AlsaDriver.cpp:(.text+0x90f): undefined reference to `snd_seq_client_info_set_client'
AlsaDriver.cpp:(.text+0x932): undefined reference to `snd_seq_get_any_client_info'
AlsaDriver.cpp:(.text+0x937): undefined reference to `snd_seq_port_info_sizeof'
AlsaDriver.cpp:(.text+0x95a): undefined reference to `snd_seq_port_info_sizeof'
AlsaDriver.cpp:(.text+0x987): undefined reference to `snd_seq_port_info_set_client'
AlsaDriver.cpp:(.text+0x99d): undefined reference to `snd_seq_port_info_set_port'
AlsaDriver.cpp:(.text+0x9cb): undefined reference to `snd_seq_get_any_port_info'
AlsaDriver.cpp:(.text+0x9e1): undefined reference to `snd_seq_client_info_get_name'
AlsaDriver.cpp:(.text+0xa18): undefined reference to `snd_seq_port_info_get_name'
AlsaDriver.cpp:(.text+0xa71): undefined reference to `snd_seq_port_info_get_capability'
AlsaDriver.cpp:(.text+0xa7f): undefined reference to `snd_seq_port_info_get_type'
AlsaDriver.cpp:(.text+0xae8): undefined reference to `snd_seq_client_info_get_type'
default/src/AlsaDriver_1.o: In function `AlsaDriver::refresh_ports()':
AlsaDriver.cpp:(.text+0x145c): undefined reference to `snd_seq_client_info_sizeof'
AlsaDriver.cpp:(.text+0x147f): undefined reference to `snd_seq_client_info_sizeof'
AlsaDriver.cpp:(.text+0x14a9): undefined reference to `snd_seq_client_info_set_client'
AlsaDriver.cpp:(.text+0x14ae): undefined reference to `snd_seq_port_info_sizeof'
AlsaDriver.cpp:(.text+0x14d1): undefined reference to `snd_seq_port_info_sizeof'
AlsaDriver.cpp:(.text+0x1519): undefined reference to `snd_seq_client_info_get_client'
AlsaDriver.cpp:(.text+0x1528): undefined reference to `snd_seq_port_info_set_client'
AlsaDriver.cpp:(.text+0x153b): undefined reference to `snd_seq_port_info_set_port'
AlsaDriver.cpp:(.text+0x154b): undefined reference to `snd_seq_port_info_get_addr'
AlsaDriver.cpp:(.text+0x15ef): undefined reference to `snd_seq_query_next_port'
AlsaDriver.cpp:(.text+0x1611): undefined reference to `snd_seq_query_next_client'
default/src/AlsaDriver_1.o: In function `AlsaDriver::add_connections(boost::shared_ptr<PatchagePort>)':
AlsaDriver.cpp:(.text+0x1a33): undefined reference to `snd_seq_query_subscribe_sizeof'
AlsaDriver.cpp:(.text+0x1a56): undefined reference to `snd_seq_query_subscribe_sizeof'
AlsaDriver.cpp:(.text+0x1a7f): undefined reference to `snd_seq_query_subscribe_set_root'
AlsaDriver.cpp:(.text+0x1a92): undefined reference to `snd_seq_query_subscribe_set_index'
AlsaDriver.cpp:(.text+0x1aa2): undefined reference to `snd_seq_query_subscribe_get_addr'
AlsaDriver.cpp:(.text+0x1d0f): undefined reference to `snd_seq_query_subscribe_get_index'
AlsaDriver.cpp:(.text+0x1d21): undefined reference to `snd_seq_query_subscribe_set_index'
AlsaDriver.cpp:(.text+0x1d39): undefined reference to `snd_seq_query_port_subscribers'
default/src/AlsaDriver_1.o: In function `AlsaDriver::connect(boost::shared_ptr<PatchagePort>, boost::shared_ptr<PatchagePort>)':
AlsaDriver.cpp:(.text+0x1df5): undefined reference to `snd_seq_port_subscribe_malloc'
AlsaDriver.cpp:(.text+0x1e07): undefined reference to `snd_seq_port_subscribe_set_sender'
AlsaDriver.cpp:(.text+0x1e19): undefined reference to `snd_seq_port_subscribe_set_dest'
AlsaDriver.cpp:(.text+0x1e2c): undefined reference to `snd_seq_port_subscribe_set_exclusive'
AlsaDriver.cpp:(.text+0x1e3f): undefined reference to `snd_seq_port_subscribe_set_time_update'
AlsaDriver.cpp:(.text+0x1e52): undefined reference to `snd_seq_port_subscribe_set_time_real'
AlsaDriver.cpp:(.text+0x1e67): undefined reference to `snd_seq_get_port_subscription'
AlsaDriver.cpp:(.text+0x1eb3): undefined reference to `snd_seq_subscribe_port'
AlsaDriver.cpp:(.text+0x1ec7): undefined reference to `snd_strerror'
default/src/AlsaDriver_1.o: In function `AlsaDriver::disconnect(boost::shared_ptr<PatchagePort>, boost::shared_ptr<PatchagePort>)':
AlsaDriver.cpp:(.text+0x22eb): undefined reference to `snd_seq_port_subscribe_malloc'
AlsaDriver.cpp:(.text+0x22fd): undefined reference to `snd_seq_port_subscribe_set_sender'
AlsaDriver.cpp:(.text+0x230f): undefined reference to `snd_seq_port_subscribe_set_dest'
AlsaDriver.cpp:(.text+0x2322): undefined reference to `snd_seq_port_subscribe_set_exclusive'
AlsaDriver.cpp:(.text+0x2335): undefined reference to `snd_seq_port_subscribe_set_time_update'
AlsaDriver.cpp:(.text+0x2348): undefined reference to `snd_seq_port_subscribe_set_time_real'
AlsaDriver.cpp:(.text+0x235d): undefined reference to `snd_seq_get_port_subscription'
AlsaDriver.cpp:(.text+0x23a9): undefined reference to `snd_seq_unsubscribe_port'
AlsaDriver.cpp:(.text+0x23bd): undefined reference to `snd_strerror'
default/src/AlsaDriver_1.o: In function `AlsaDriver::create_refresh_port()':
AlsaDriver.cpp:(.text+0x27bb): undefined reference to `snd_seq_port_info_sizeof'
AlsaDriver.cpp:(.text+0x27de): undefined reference to `snd_seq_port_info_sizeof'
AlsaDriver.cpp:(.text+0x280a): undefined reference to `snd_seq_port_info_set_name'
AlsaDriver.cpp:(.text+0x281d): undefined reference to `snd_seq_port_info_set_capability'
AlsaDriver.cpp:(.text+0x2830): undefined reference to `snd_seq_port_info_set_type'
AlsaDriver.cpp:(.text+0x2845): undefined reference to `snd_seq_create_port'
AlsaDriver.cpp:(.text+0x2859): undefined reference to `snd_strerror'
AlsaDriver.cpp:(.text+0x28a6): undefined reference to `snd_seq_port_info_get_port'
AlsaDriver.cpp:(.text+0x28c8): undefined reference to `snd_seq_connect_from'
AlsaDriver.cpp:(.text+0x28dc): undefined reference to `snd_strerror'
default/src/AlsaDriver_1.o: In function `AlsaDriver::_refresh_main()':
AlsaDriver.cpp:(.text+0x2a08): undefined reference to `snd_seq_poll_descriptors_count'
AlsaDriver.cpp:(.text+0x2a53): undefined reference to `snd_seq_poll_descriptors'
AlsaDriver.cpp:(.text+0x2af9): undefined reference to `snd_seq_poll_descriptors_revents'
AlsaDriver.cpp:(.text+0x2b0d): undefined reference to `snd_strerror'
AlsaDriver.cpp:(.text+0x2b4f): undefined reference to `snd_seq_port_info_sizeof'
AlsaDriver.cpp:(.text+0x2b72): undefined reference to `snd_seq_port_info_sizeof'
AlsaDriver.cpp:(.text+0x2bc8): undefined reference to `snd_seq_event_input'
AlsaDriver.cpp:(.text+0x2cb6): undefined reference to `snd_seq_port_info_set_client'
AlsaDriver.cpp:(.text+0x2cc1): undefined reference to `snd_seq_port_info_get_capability'
AlsaDriver.cpp:(.text+0x2d53): undefined reference to `snd_seq_port_info_set_client'
AlsaDriver.cpp:(.text+0x2d5e): undefined reference to `snd_seq_port_info_get_capability'
collect2: ld returned 1 exit status
Waf: Leaving directory `/home/lorenzo/drobilla-lad/patchage/build'
Build failed
 -> task failed (err #1): 
	{task: cxx_link LashClient_1.o,Patchage_1.o,PatchageCanvas_1.o,PatchageEvent_1.o,StateManager_1.o,main_1.o,LashProxy_1.o,LoadProjectDialog_1.o,Project_1.o,ProjectList_1.o,ProjectPropertiesDialog_1.o,Session_1.o,DBus_1.o,JackDriver_1.o,AlsaDriver_1.o -> patchage}

I've tried to reistall packages libasound2 and libasound2-dev , but I can't fix it. I have my <alsa/asoundlib.h> in /usr/include and the compiler is able to see it...

Change History (2)

comment:1 Changed 11 years ago by anonymous

Same problem for me. I tried to compile Patchage from ./waf in the root and from ./waf in the /patchage/ directory (normal and also with ./waf configure --no-lash). Maybe the linker has got troubles to find libasound libraries? Please, help us :(

comment:2 Changed 11 years ago by David Robillard

Resolution: invalid
Status: newclosed

This is a problem with your distribution. Patchage uses the output from pkg-config to get the Alsa compilation flags.

Ensure that "pkg-config --libs alsa" outputs the appropriate flags (i.e. -lasound). Reopen this bug if so.

Note: See TracTickets for help on using tickets.