Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I nade the static libraries for ALSA but then found more problems.
Had to add lpthread and -ldl. That caused a warning that I could not clear up.
Code:
gcc -g -O2 -static -lasound -lpthread -ldl -o vmsrec vmsrec.o args.o file.o help.o audio.o S-2-A.o console.o comport.o
vmsrec.o: In function `Quit':
/src/VMS/v1.1/src/record/vmsrec.c:293: undefined reference to `snd_pcm_drop'
/src/VMS/v1.1/src/record/vmsrec.c:294: undefined reference to `snd_pcm_close'
vmsrec.o: In function `main':
/src/VMS/v1.1/src/record/vmsrec.c:165: undefined reference to `snd_pcm_readi'
audio.o: In function `Close_Audio':
/src/VMS/v1.1/src/record/audio.c:87: undefined reference to `snd_pcm_close'
audio.o: In function `Open_Audio':
/src/VMS/v1.1/src/record/audio.c:21: undefined reference to `snd_pcm_open'
/src/VMS/v1.1/src/record/audio.c:26: undefined reference to `snd_pcm_poll_descriptors_count'
/src/VMS/v1.1/src/record/audio.c:34: undefined reference to `snd_pcm_poll_descriptors'
/src/VMS/v1.1/src/record/audio.c:42: undefined reference to `snd_pcm_hw_params_sizeof'
/src/VMS/v1.1/src/record/audio.c:42: undefined reference to `snd_pcm_hw_params_sizeof'
/src/VMS/v1.1/src/record/audio.c:43: undefined reference to `snd_pcm_hw_params_any'
/src/VMS/v1.1/src/record/audio.c:45: undefined reference to `snd_pcm_hw_params_set_access'
/src/VMS/v1.1/src/record/audio.c:46: undefined reference to `snd_pcm_hw_params_set_channels'
/src/VMS/v1.1/src/record/audio.c:47: undefined reference to `snd_pcm_hw_params_set_format'
/src/VMS/v1.1/src/record/audio.c:48: undefined reference to `snd_pcm_hw_params_set_rate_near'
/src/VMS/v1.1/src/record/audio.c:50: undefined reference to `snd_pcm_hw_params'
/src/VMS/v1.1/src/record/audio.c:53: undefined reference to `snd_pcm_start'
collect2: ld returned 1 exit status
make: *** [vmsrec] Error 1
$ sudo locate libasound.a
/src/ALSA/alsa-lib-1.0.9rc4/src/.libs/libasound.a
/usr/lib/libasound.a
And to answer your question, I'm running FC8 with alsa-lib-1.0.9rc4.
[QUOTE=MrUmunhum;3441347]I nade the static libraries for ALSA but then found more problems.
Had to add lpthread and -ldl. That caused a warning that I could not clear up.
Code:
gcc -g -O2 -static -lasound -lpthread -ldl -o vmsrec vmsrec.o args.o file.o help.o audio.o S-2-A.o console.o comport.o
vmsrec.o: In function `Quit':
/src/VMS/v1.1/src/record/vmsrec.c:293: undefined reference to `snd_pcm_drop'
/src/VMS/v1.1/src/record/vmsrec.c:294: undefined reference to `snd_pcm_close'
vmsrec.o: In function `main':
/src/VMS/v1.1/src/record/vmsrec.c:165: undefined reference to `snd_pcm_readi'
audio.o: In function `Close_Audio':
/src/VMS/v1.1/src/record/audio.c:87: undefined reference to `snd_pcm_close'
audio.o: In function `Open_Audio':
/src/VMS/v1.1/src/record/audio.c:21: undefined reference to `snd_pcm_open'
/src/VMS/v1.1/src/record/audio.c:26: undefined reference to `snd_pcm_poll_descriptors_count'
/src/VMS/v1.1/src/record/audio.c:34: undefined reference to `snd_pcm_poll_descriptors'
/src/VMS/v1.1/src/record/audio.c:42: undefined reference to `snd_pcm_hw_params_sizeof'
/src/VMS/v1.1/src/record/audio.c:42: undefined reference to `snd_pcm_hw_params_sizeof'
/src/VMS/v1.1/src/record/audio.c:43: undefined reference to `snd_pcm_hw_params_any'
/src/VMS/v1.1/src/record/audio.c:45: undefined reference to `snd_pcm_hw_params_set_access'
/src/VMS/v1.1/src/record/audio.c:46: undefined reference to `snd_pcm_hw_params_set_channels'
/src/VMS/v1.1/src/record/audio.c:47: undefined reference to `snd_pcm_hw_params_set_format'
/src/VMS/v1.1/src/record/audio.c:48: undefined reference to `snd_pcm_hw_params_set_rate_near'
/src/VMS/v1.1/src/record/audio.c:50: undefined reference to `snd_pcm_hw_params'
/src/VMS/v1.1/src/record/audio.c:53: undefined reference to `snd_pcm_start'
collect2: ld returned 1 exit status
make: *** [vmsrec] Error 1
Yikes, not sure what is going on there... what this means (at least, some more knowledgable guys said so when I got the same types of errors) is that "you have an older or incompatible library version".
I. e. the vmsrec.c and audo.c files, refer to symbols that are not present in the libraries you have listed when you try to compile the program (from there the complaints about "undefined references".
I don't see how adding -lpthread -ldl (whatever "dl" is) can cause these.... Most likely you'll need to get a newer ALSA lib, if one exits, and try compiling against that?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.