Csound Csound-dev Csound-tekno Search About

[Cs-dev] very perplexing linux csound + python install problem

Date2011-04-22 22:48
Fromdavid medine
Subject[Cs-dev] very perplexing linux csound + python install problem
Dear all,
I posted the following to the Ubuntu forum the other day and have 
received no replies other than a suggestion to try here:

Hello,
I am running Ubuntu 10.10 on an AMD quadcore and I am trying to install 
Csound plus its fancy python jazz. I am attempting to use python2.7 
(although it doesn't make a difference if I specify another version). 
Anyway, the build command I run is something like this:
code:
scons buildInterfaces=1 buildPythonWrapper=1 etc.

and the error that I get is this:
/usr/bin/ld: /usr/local/lib/libpython2.7.a(abstract.o): relocation 
R_X86_64_32 against `.rodata.str1.8' can not be used when making a 
shared object; recompile with -fPIC
/usr/local/lib/libpython2.7.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
scons: *** [_csnd.so] Error 1
scons: building terminated because of errors.

Csound builds just fine when I exclude the python wrapper flag.

Now, when I build python, I notice that there are all kinds of -fPIC 
flags flying when it is putting the libraries into /usr/local/lib. Just 
in case I have tried reinstalling with the -fPIC on after hitting make. 
Still nothing. I have been at it for days with no success.

What is truly odd is that I have done this successfully (with no 
problems at all!!) on my little lenovo netbook (also running Ubuntu 10.10).

No one else on the web (as far as I can see) is encountering this error. 
I have requested a login to the csound forum, but they insist on 
granting each one via email and I am still awaiting a reply.

I presume that this must have something to do with 64 vs 32 bit 
architecture (the problematic desktop is 64), but I have no idea where 
to begin rectifying this situation.

Any ideas?

------------------------------------------------------------------------------
Fulfilling the Lean Software Promise
Lean software platforms are now widely adopted and the benefits have been 
demonstrated beyond question. Learn why your peers are replacing JEE 
containers with lightweight application servers - and what you can gain 
from the move. http://p.sf.net/sfu/vmware-sfemails
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2011-04-22 23:05
FromVictor Lazzarini
SubjectRe: [Cs-dev] very perplexing linux csound + python install problem
It seems the build is trying to link to a static libpython  
(libpython.a, instead of libpython.so). Maybe this is the problem?
Try building with dynamicCsoundLibrary=1 to see if it makes a  
difference.

Victor

On 22 Apr 2011, at 22:48, david medine wrote:

> Dear all,
> I posted the following to the Ubuntu forum the other day and have
> received no replies other than a suggestion to try here:
>
> Hello,
> I am running Ubuntu 10.10 on an AMD quadcore and I am trying to  
> install
> Csound plus its fancy python jazz. I am attempting to use python2.7
> (although it doesn't make a difference if I specify another version).
> Anyway, the build command I run is something like this:
> code:
> scons buildInterfaces=1 buildPythonWrapper=1 etc.
>
> and the error that I get is this:
> /usr/bin/ld: /usr/local/lib/libpython2.7.a(abstract.o): relocation
> R_X86_64_32 against `.rodata.str1.8' can not be used when making a
> shared object; recompile with -fPIC
> /usr/local/lib/libpython2.7.a: could not read symbols: Bad value
> collect2: ld returned 1 exit status
> scons: *** [_csnd.so] Error 1
> scons: building terminated because of errors.
>
> Csound builds just fine when I exclude the python wrapper flag.
>
> Now, when I build python, I notice that there are all kinds of -fPIC
> flags flying when it is putting the libraries into /usr/local/lib.  
> Just
> in case I have tried reinstalling with the -fPIC on after hitting  
> make.
> Still nothing. I have been at it for days with no success.
>
> What is truly odd is that I have done this successfully (with no
> problems at all!!) on my little lenovo netbook (also running Ubuntu  
> 10.10).
>
> No one else on the web (as far as I can see) is encountering this  
> error.
> I have requested a login to the csound forum, but they insist on
> granting each one via email and I am still awaiting a reply.
>
> I presume that this must have something to do with 64 vs 32 bit
> architecture (the problematic desktop is 64), but I have no idea where
> to begin rectifying this situation.
>
> Any ideas?
>
> ------------------------------------------------------------------------------
> Fulfilling the Lean Software Promise
> Lean software platforms are now widely adopted and the benefits have  
> been
> demonstrated beyond question. Learn why your peers are replacing JEE
> containers with lightweight application servers - and what you can  
> gain
> from the move. http://p.sf.net/sfu/vmware-sfemails
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel

Dr Victor Lazzarini
Senior Lecturer
Dept. of Music
NUI Maynooth Ireland
tel.: +353 1 708 3545
Victor dot Lazzarini AT nuim dot ie




------------------------------------------------------------------------------
Fulfilling the Lean Software Promise
Lean software platforms are now widely adopted and the benefits have been 
demonstrated beyond question. Learn why your peers are replacing JEE 
containers with lightweight application servers - and what you can gain 
from the move. http://p.sf.net/sfu/vmware-sfemails
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2011-04-23 04:08
FromErik de Castro Lopo
SubjectRe: [Cs-dev] very perplexing linux csound + python install problem
david medine wrote:

> I am running Ubuntu 10.10 on an AMD quadcore

I'm pretty sure your CPU is x86_64. What about your distro? Did you
install the amd64 version of ubuntu or the x86 version?

> and the error that I get is this:
> /usr/bin/ld: /usr/local/lib/libpython2.7.a(abstract.o): relocation 

It looks like you built python youself. Why? On Ubuntu (and Debian)
that is almost always a mistake. Thing like Python are infrastructure
software and you are much better off installing whatever your
distribution provides via apt-get/aptitude/synaptic.

> R_X86_64_32 against `.rodata.str1.8' can not be used when making a 
> shared object; recompile with -fPIC
> /usr/local/lib/libpython2.7.a: could not read symbols: Bad value

I suspect you won't have that trouble if you compile against the
system installed Python. You will however need to install the
python-dev package.

> I presume that this must have something to do with 64 vs 32 bit 
> architecture (the problematic desktop is 64), but I have no idea where 
> to begin rectifying this situation.

Install as much as you possibly can via tha distro package manager.
Only install what you absolutely have to from source. If you insist
on source install switch to Gentoo or Slakware (which will be a far
bigger PITA than what you have now).

Erik
-- 
----------------------------------------------------------------------
Erik de Castro Lopo
http://www.mega-nerd.com/

------------------------------------------------------------------------------
Fulfilling the Lean Software Promise
Lean software platforms are now widely adopted and the benefits have been 
demonstrated beyond question. Learn why your peers are replacing JEE 
containers with lightweight application servers - and what you can gain 
from the move. http://p.sf.net/sfu/vmware-sfemails
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2011-04-23 09:31
Fromjpff@cs.bath.ac.uk
SubjectRe: [Cs-dev] very perplexing linux csound + python install problem
the remark about PIC suggests you need Word64=1 to build a 64bit binary.


> david medine wrote:
>
>> I am running Ubuntu 10.10 on an AMD quadcore
>
> I'm pretty sure your CPU is x86_64. What about your distro? Did you
> install the amd64 version of ubuntu or the x86 version?
>
>> and the error that I get is this:
>> /usr/bin/ld: /usr/local/lib/libpython2.7.a(abstract.o): relocation
>
> It looks like you built python youself. Why? On Ubuntu (and Debian)
> that is almost always a mistake. Thing like Python are infrastructure
> software and you are much better off installing whatever your
> distribution provides via apt-get/aptitude/synaptic.
>
>> R_X86_64_32 against `.rodata.str1.8' can not be used when making a
>> shared object; recompile with -fPIC
>> /usr/local/lib/libpython2.7.a: could not read symbols: Bad value
>
> I suspect you won't have that trouble if you compile against the
> system installed Python. You will however need to install the
> python-dev package.
>
>> I presume that this must have something to do with 64 vs 32 bit
>> architecture (the problematic desktop is 64), but I have no idea where
>> to begin rectifying this situation.
>
> Install as much as you possibly can via tha distro package manager.
> Only install what you absolutely have to from source. If you insist
> on source install switch to Gentoo or Slakware (which will be a far
> bigger PITA than what you have now).
>
> Erik
> --
> ----------------------------------------------------------------------
> Erik de Castro Lopo
> http://www.mega-nerd.com/
>
> ------------------------------------------------------------------------------
> Fulfilling the Lean Software Promise
> Lean software platforms are now widely adopted and the benefits have been
> demonstrated beyond question. Learn why your peers are replacing JEE
> containers with lightweight application servers - and what you can gain
> from the move. http://p.sf.net/sfu/vmware-sfemails
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
>
>



------------------------------------------------------------------------------
Fulfilling the Lean Software Promise
Lean software platforms are now widely adopted and the benefits have been 
demonstrated beyond question. Learn why your peers are replacing JEE 
containers with lightweight application servers - and what you can gain 
from the move. http://p.sf.net/sfu/vmware-sfemails
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2011-04-23 17:25
FromFelipe Sateler
SubjectRe: [Cs-dev] very perplexing linux csound + python install problem
On Sat, Apr 23, 2011 at 05:31,   wrote:
> the remark about PIC suggests you need Word64=1 to build a 64bit binary.

The word64 flag doesn't do anything useful on a debian-derived distro
(at least with 5.13).



-- 

Saludos,
Felipe Sateler

------------------------------------------------------------------------------
Fulfilling the Lean Software Promise
Lean software platforms are now widely adopted and the benefits have been 
demonstrated beyond question. Learn why your peers are replacing JEE 
containers with lightweight application servers - and what you can gain 
from the move. http://p.sf.net/sfu/vmware-sfemails
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net