KenT
Posts: 758
Joined: Tue Jan 24, 2012 9:30 am
Location: Hertfordshire, UK
Contact: Website

hello_audio will not Make after using rpi-update

Tue May 29, 2012 6:33 pm

Some files in hello_pi have been updated and are downloaded by rpi-update

Running the Makefile for hello_audio using the new files reports a number of duplicate function declarations.

Before using rpi-update I copied hello_pi to another directory. Following the update hello_audio from this directory still compiles, so it sounds like something in hello_pi. However all the other hello programs compile.

There are differences in Makefile.include but copying across the old one seems to make no difference.

Sorry, I'm going to have to leave it to an expert to investigate further

Ken

Error report follows:

COMPILE hello-audio

cc -DSTANDALONE -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -DTARGET_POSIX -D_LINUX -fPIC -DPIC -D_REENTRANT -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -U_FORTIFY_SOURCE -Wall -g -DHAVE_LIBOPENMAX=2 -DOMX -DOMX_SKIP64BIT -ftree-vectorize -pipe -DUSE_EXTERNAL_OMX -DHAVE_LIBBCM_HOST -DUSE_EXTERNAL_LIBBCM_HOST -DUSE_VCHIQ_ARM -Wno-psabi -I/opt/vc/include/ -I/opt/vc/include/ -I./ -I../libs -g -c audio.c -o audio.o -Wno-deprecated-declarations

cc -DSTANDALONE -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -DTARGET_POSIX -D_LINUX -fPIC -DPIC -D_REENTRANT -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -U_FORTIFY_SOURCE -Wall -g -DHAVE_LIBOPENMAX=2 -DOMX -DOMX_SKIP64BIT -ftree-vectorize -pipe -DUSE_EXTERNAL_OMX -DHAVE_LIBBCM_HOST -DUSE_EXTERNAL_LIBBCM_HOST -DUSE_VCHIQ_ARM -Wno-psabi -I/opt/vc/include/ -I/opt/vc/include/ -I./ -I../libs -g -c sinewave.c -o sinewave.o -Wno-deprecated-declarations

cc -o hello_audio.bin -Wl,--whole-archive -L/opt/vc/lib/ -lGLESv2 -lEGL -lopenmaxil -lbcm_host -lvcos -lvchiq_arm ../libs/libilclient.a audio.o sinewave.o -Wl,--no-whole-archive -rdynamic

audio.o: In function `audioplay_create':
/opt/vc/src/hello_pi/hello_audio/audio.c:69: multiple definition of `audioplay_create'
../libs/libilclient.a(audioplay.c.o):audioplay.c:(.text+0x4): first defined here
audio.o: In function `audioplay_delete':
/opt/vc/src/hello_pi/hello_audio/audio.c:202: multiple definition of `audioplay_delete'
../libs/libilclient.a(audioplay.c.o):audioplay.c:(.text+0x34c): first defined here
audio.o: In function `audioplay_get_buffer':
/opt/vc/src/hello_pi/hello_audio/audio.c:226: multiple definition of `audioplay_get_buffer'
../libs/libilclient.a(audioplay.c.o):audioplay.c:(.text+0x3e0): first defined here
audio.o: In function `audioplay_play_buffer':
/opt/vc/src/hello_pi/hello_audio/audio.c:248: multiple definition of `audioplay_play_buffer'
../libs/libilclient.a(audioplay.c.o):audioplay.c:(.text+0x444): first defined here
audio.o: In function `audioplay_get_latency':
/opt/vc/src/hello_pi/hello_audio/audio.c:314: multiple definition of `audioplay_get_latency'
../libs/libilclient.a(audioplay.c.o):audioplay.c:(.text+0x54c): first defined here
collect2: ld returned 1 exit status
make: *** [hello_audio.bin] Error 1
rm sinewave.o audio.o
Pi Presents - A toolkit to produce multi-media interactive display applications for museums, visitor centres, and more
Download from http://pipresents.wordpress.com

kevpatts
Posts: 8
Joined: Wed Apr 18, 2012 4:46 pm

Re: hello_audio will not Make after using rpi-update

Tue May 29, 2012 9:07 pm

I had the same error.

If you edit the audio.c file and delete all the duplicate functions (the bulk of the file) it will compile and run as expected.

User avatar
Iggy82
Posts: 10
Joined: Sat Jun 02, 2012 12:55 pm
Location: Cambridge, UK
Contact: Website

Re: hello_audio will not Make after using rpi-update

Sat Jun 02, 2012 12:58 pm

If you edit the audio.c file and delete all the duplicate functions (the bulk of the file)
OK so I need more guidance on this. I have opened the audio.c file with leafpad but I don't know what the duplicate functions look like. Can you give further instructions for newbie?

AdVATAR
Posts: 5
Joined: Sat Dec 29, 2012 5:54 am
Contact: Website

Re: hello_audio will not Make after using rpi-update

Sat Dec 29, 2012 5:59 am

Hello! I had the exact same problem that you did. When attempting to compile the hello_audio file, I received the "Error 1" and could not test out my sound. I found the fix at the following link: http://www.elinux.org/R-Pi_Troubleshoot ... MI_monitor

This is what the information in the above link told me to do that worked:

Code: Select all

 cd /opt/vc/src/hello_pi/
 ./rebuild.sh
 cd hello_audio
To test analog output, then type:

Code: Select all

 ./hello_audio.bin
To test HDMI output, type:

Code: Select all

 ./hello_audio.bin 1

Return to “Graphics, sound and multimedia”