Csound Csound-dev Csound-tekno Search About

[Csnd] csound5 building problems on debian sid: Checking for C library portmidi... (cached) no

Date2008-01-17 14:31
FromDietrich Bollmann
Subject[Csnd] csound5 building problems on debian sid: Checking for C library portmidi... (cached) no
Hi, 

I would like to build csound5 on debian sid and installed the debian
packages `libportmidi0' and `libportmidi-dev'.  But still scons
complains with

  Checking for C library portmidi... (cached) no

When trying to understand why the `portmidiFound' test fails, I get the
following:

  gcc -o \
  >   conftest_3 -Wl,-Bdynamic conftest_3.o -L. -L. -L/usr/local/lib -L.
-L. \
  >   -L/usr/lib/fltk-1.1 -L/usr/lib/j2sdk1.5-sun/include -lsndfile
-lportaudio -lportmidi
  /usr/lib/gcc/i486-linux-gnu/4.2.3/../../../../lib/libportmidi.so:
undefined reference to `Pt_Start'
  /usr/lib/gcc/i486-linux-gnu/4.2.3/../../../../lib/libportmidi.so:
undefined reference to `Pt_Time'
  /usr/lib/gcc/i486-linux-gnu/4.2.3/../../../../lib/libportmidi.so:
undefined reference to `Pt_Started'
  collect2: ld returned 1 exit status

What can I do?

Might this be caused by the debian portmidi packages (which seem to be
from 2004)?

Should I install portmidi from source?

Thanks for your help, Dietrich


By the way, is this the right mailing list to ask such questions?

---
Here the failing test in more detail:

mkdir -p /tmp/conftest
cd /tmp/conftest

cat > conftest_3.c < /usr/lib/gcc/i486-linux-gnu/4.2.3/../../../../lib/libportmidi.so:
undefined reference to `Pt_Start'
> /usr/lib/gcc/i486-linux-gnu/4.2.3/../../../../lib/libportmidi.so:
undefined reference to `Pt_Time'
> /usr/lib/gcc/i486-linux-gnu/4.2.3/../../../../lib/libportmidi.so:
undefined reference to `Pt_Started'
> collect2: ld returned 1 exit status



Date2008-01-17 15:16
FromFelipe Sateler
Subject[Csnd] Re: csound5 building problems on debian sid: Checking for C library portmidi... (cached) no
AttachmentsNone  

Date2008-01-17 15:22
FromFelipe Sateler
Subject[Csnd] Re: csound5 building problems on debian sid: Checking for C library portmidi... (cached) no
AttachmentsNone  

Date2008-01-17 15:27
FromJeff Harrington
Subject[Csnd] Way Off Topic - Elsie's Novel About an Experimental Electronic Composer Made it to the Amazon Semi-Finalists!!!
Elsie's (my wife) first novel about a brilliant young composer whose 
experimental music accidentally kills several audience members was 
selected as one of the Amazon Breakthrough Novel Award semi-finalists!   
It's a farce/thriller/romance... and I don't remember if Csound is 
mentioned or not!  ;) 

You can read an excerpt here:

http://www.amazon.com/dp/B00126597U

Elsie Russell Speaks About In Over Her Head - Official ABNA Entrant:
The debut of Penny Bell's's musical composition, featuring the use of 
mysterious extremely low frequency waves takes a tragic turn when 
several concert-goers die in their seats during the performance. The 
once-bright horizons of Penny's career collapse, and she retreats to a 
dank Soho basement apartment lit only by the glow of computer monitors 
and electronic displays. There, using herself as a guinea pig, she sets 
out to unlock the secrets of her beautiful and deadly symphonies. A 
series of strange coincidences intrude upon her solitary quest. Her 
neighbor, the erotic performance artist Ula Nova, disappears after her 
studio is broken into. And then Ula's charming and damaged young 
choreographer appears, and sweeps Penny off to Europe to search for the 
diva, plunging Penny into a seedy and unfamiliar world of jet set 
artists and international intrigue where the threads of every encounter 
always seem to lead back to those ELF waves and their pint-sized 
progenitor.

///////////
If any of you guys want to write a customer review - the winner is also 
chosen by popularity from customer responses... hint... hint... wink... 
wink...

Jeff Harrington
http://jeffharrington.org


Date2008-01-17 16:02
FromDietrich Bollmann
Subject[Csnd] Re: Re: csound5 building problems on debian sid: Checking for C library portmidi... (cached) no
Hi Felipe,

On Thu, 2008-01-17 at 12:16 -0300, Felipe Sateler wrote:
> On Thursday 17 January 2008 11:31:29 Dietrich Bollmann wrote:
> >   Checking for C library portmidi... (cached) no
> 
> This seems to indicate that the test is not actually being run. You could try 
> deleting the scons cache (rm -r .scon*), and then trying again.
> Note that there are some already-built debian packages (by me), which you are 
> welcome to test, available at http://cs.bath.ac.uk/jpff/Csound5/debian
> -- 
> Felipe Sateler

Even after deleting the scons cache the result is the same.
(This time: Checking for C library portmidi... no )

In order to understand why the test failed I looked at the `config.log'
file where I found the following:

------------
...snip...
scons: Configure: Checking for C library portmidi... 
.sconf_temp/conftest_3.c <-
  |
  |
  |#include "portmidi.h"
  |
  |int
  |main() {
  |  
  |return 0;
  |}
  |
gcc -o .sconf_temp/conftest_3.o -c -Wall -g -O2 -DLINUX -DPIPES -DSDFT
-DBETA -DHAVE_SOCKETS -I. -IH -I/usr/include/fltk-1.1 -I/usr/local/incl
ude -I/usr/include -I/usr/include
-I/usr/X11R6/include .sconf_temp/conftest_3.c
gcc -o .sconf_temp/conftest_3 -Wl,-Bdynamic .sconf_temp/conftest_3.o -L.
-L. -L/usr/local/lib -L. -L. -L/usr/lib/fltk-1.1 -L/usr/lib/j2sdk1.5-
sun/include -lsndfile -lportaudio -lportmidi
/usr/lib/gcc/i486-linux-gnu/4.2.3/../../../../lib/libportmidi.so:
undefined reference to `Pt_Start'
/usr/lib/gcc/i486-linux-gnu/4.2.3/../../../../lib/libportmidi.so:
undefined reference to `Pt_Time'
/usr/lib/gcc/i486-linux-gnu/4.2.3/../../../../lib/libportmidi.so:
undefined reference to `Pt_Started'
collect2: ld returned 1 exit status
scons: Configure: no
...ship...
------------

Then I tried the test manually for myself again (see my last email) and
got - the same of course :)

------------
 gcc -o \
>   conftest_3 -Wl,-Bdynamic conftest_3.o -L. -L. -L/usr/local/lib -L.
-L. \
>   -L/usr/lib/fltk-1.1 -L/usr/lib/j2sdk1.5-sun/include -lsndfile
-lportaudio -lportmidi
/usr/lib/gcc/i486-linux-gnu/4.2.3/../../../../lib/libportmidi.so:
undefined reference to `Pt_Start'
/usr/lib/gcc/i486-linux-gnu/4.2.3/../../../../lib/libportmidi.so:
undefined reference to `Pt_Time'
/usr/lib/gcc/i486-linux-gnu/4.2.3/../../../../lib/libportmidi.so:
undefined reference to `Pt_Started'
collect2: ld returned 1 exit status
------------

The linker couldn't find the references for `Pt_Start', `Pt_Time' and
`Pt_Started'.

I tested the csound debian packages but would like to fiddle around with
the sources from time to time :)

Concerning your second mail:

On Thu, 2008-01-17 at 12:22 -0300, Felipe Sateler wrote: 
> On Thursday 17 January 2008 12:16:11 Felipe Sateler wrote:
> > On Thursday 17 January 2008 11:31:29 Dietrich Bollmann wrote:
> Duh, I somehow skipped the "undefined symbols" part. 
> 
> This is certainly strange. My scons log doesn't show this step. conftest_3 is 
> only compiled into an object file, not a program. Maybe this is related to 
> the dirty cache?

Did you look into the `config.log' file?

In the case of portaudio for which the test succeeded there is:

--------------
scons: Configure: Checking for C library portaudio... 
.sconf_temp/conftest_2.c <-
  |
  |
  |#include "portaudio.h"
  |
  |int
  |main() {
  |  
  |return 0;
  |}
  |
gcc -o .sconf_temp/conftest_2.o -c -Wall -g -O2 -DLINUX -DPIPES -DSDFT -DBETA -DHAVE_SOCKETS -I. -IH -I/usr/include/fltk-1.1 -I/usr/local/incl
ude -I/usr/include -I/usr/include -I/usr/X11R6/include .sconf_temp/conftest_2.c
gcc -o .sconf_temp/conftest_2 -Wl,-Bdynamic .sconf_temp/conftest_2.o -L. -L. -L/usr/local/lib -L. -L. -L/usr/lib/fltk-1.1 -L/usr/lib/j2sdk1.5-
sun/include -lsndfile -lportaudio
scons: Configure: yes
---------------

So I suppose in your case it looked like the following for portmidi?:

---------------
scons: Configure: Checking for C library portmidi... 
.sconf_temp/conftest_3.c <-
  |
  |
  |#include "portmidi.h"
  |
  |int
  |main() {
  |  
  |return 0;
  |}
  |
gcc -o .sconf_temp/conftest_3.o -c -Wall -g -O2 -DLINUX -DPIPES -DSDFT -DBETA -DHAVE_SOCKETS -I. -IH -I/usr/include/fltk-1.1 -I/usr/local/incl
ude -I/usr/include -I/usr/include -I/usr/X11R6/include .sconf_temp/conftest_3.c
gcc -o .sconf_temp/conftest_3 -Wl,-Bdynamic .sconf_temp/conftest_3.o -L. -L. -L/usr/local/lib -L. -L. -L/usr/lib/fltk-1.1 -L/usr/lib/j2sdk1.5-
sun/include -lsndfile -lportaudio -lportmidi
scons: Configure: yes
----------------

and not - as in my case - like

----------------
...snip...
gcc -o .sconf_temp/conftest_3 -Wl,-Bdynamic .sconf_temp/conftest_3.o -L. -L. -L/usr/local/lib -L. -L. -L/usr/lib/fltk-1.1 -L/usr/lib/j2sdk1.5-
sun/include -lsndfile -lportaudio -lportmidi
/usr/lib/gcc/i486-linux-gnu/4.2.3/../../../../lib/libportmidi.so: undefined reference to `Pt_Start'
/usr/lib/gcc/i486-linux-gnu/4.2.3/../../../../lib/libportmidi.so: undefined reference to `Pt_Time'
/usr/lib/gcc/i486-linux-gnu/4.2.3/../../../../lib/libportmidi.so: undefined reference to `Pt_Started'
collect2: ld returned 1 exit status
scons: Configure: no
----------------

:(

I fear the debian package might be old and I have to install portmidi from 
source in order to make it work with csound5.

But I am not sure if this really is the right way to go ... that's why I am 
asking for help.

Did you compile on Debian sid without these problems?

Thanks for your help, Dietrich



Date2008-01-17 17:12
FromFelipe Sateler
Subject[Csnd] Re: Re: Re: csound5 building problems on debian sid: Checking for C library portmidi... (cached) no
AttachmentsNone