[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fwd: Re: curl and hdparsim]
Oops! forgot the CC!
-------- Original Message --------
Subject: Re: curl and hdparsim
Date: Thu, 21 May 2009 15:14:30 -0400
From: David Lawrence <davidl@jlab.org>
To: Bennett, Jake Vernon <jvbennet@imail.iu.edu>
References: <2C4BFD61-2D66-44F0-95C1-C68FB5318FF3@indiana.edu>
<4A140656.5040305@jlab.org>
<469BB99E-3591-4448-8F97-378A5F0F0F15@indiana.edu>,<4A140A88.6080400@jlab.org>
<6D35B56D7E26844BB834DB7CCE4B66C3099975ED@BL2PRD0102MB013.prod.exchangelabs.com>
Hi Jake,
The problem is most likely because you don't have the curl-devel
package installed. When the non-devel package is installed, only a
versioned library file is installed. Something like libcurl.so.7.16.3.
With just "-lcurl" passed to the linker it's looking for a file called
libcurl.so (i.e. without the version number). The thing compiles, but
when you run it, it can't load the hdparsim shared object because it
can't resolve the "curl_global_init" dependency since it doesn't know to
look in the libcurl library.
The easiest fix is to make a symbolic link from your
$HALLD_HOME/lib/Linux_RHEL4-athlon-gcc3.4.4 directory called
"libcurl.so" that points to the existing, versioned file that probably
lives in /usr/lib on your system. Then, re-instate the MISC_LIBS line
and try linking again with "make relink". Make the symbolic link with
something like this:
cd $HALLD_HOME/lib/Linux_RHEL4-athlon-gcc3.4.4
ln -s /usr/lib/libcurl.so.7.16.3 libcurl.so
I'm CC-ing this to the offline list just in case it helps anyone else or
they want to comment.
Regards,
-David
Bennett, Jake Vernon wrote:
> Hey, Dave.
>
> Thanks for your help with this.
>
> So I got all the headers I needed and managed to compile hdparsim, but only without the MISC_LIBS line. When I include it I get this error;
> ...
> -lHDDM -lJANA -lDANA -lPID -lTAGGER -lTRACKING -lSTART_COUNTER -lCDC -lFDC -lTOF -lBCAL -lFCAL -lHDGEOMETRY -lHDDM -lJANA -L/usr/local/root/lib -lCore -lCint -lRIO -lNet -lHist -lGraf -lGraf3d -lGpad -lTree -lRint -lPostscript -lMatrix -lPhysics -lMathCore -lThread -lGui -pthread -lm -ldl -rdynamic -lThread -lMinuit -lGeom -L/share/apps/xerces/xerces-c-src_2_7_0/lib -lxerces-c -lcurl -lssl -lcrypto -lz \
> -o .lib/Linux_RHEL4-athlon-gcc3.4.4/hdparsim.so
> /usr/bin/ld: cannot find -lcurl
> collect2: ld returned 1 exit status
> make: *** [.lib/Linux_RHEL4-athlon-gcc3.4.4/hdparsim.so] Error 1
>
>
> Now, if I leave that line out, everything compiles, but when I try to use it...
>
> [jvbennet@stan run]$ ~jvbennet/gluex/my_src/bin/Linux_RHEL4-athlon-gcc3.4.4/hd_root --plugin=hdparsim bggen.hddm
> Looking for "./hdparsim.so" ....no
> Looking for "/home/s4/jvbennet/gluex/my_src/lib//hdparsim.so" ....no
> Looking for "/home/s4/jvbennet/gluex/my_src/lib//hdparsim/hdparsim.so" ....no
> Looking for "/home/s4/jvbennet/gluex/svn/lib//hdparsim.so" ....no
> Looking for "/home/s4/jvbennet/gluex/svn/lib//hdparsim/hdparsim.so" ....no
> /home/s4/jvbennet/gluex/my_src/lib/Linux_RHEL4-athlon-gcc3.4.4//hdparsim.so: undefined symbol: curl_global_init
>
> ***ERROR : Couldn't find plugin "hdparsim"!***
>
>
> Do you know what is happening here? I may just have to wait until tomorrow when our sysadmin returns, but I would like to know why this isn't working if it is not too much trouble.
>
> Thanks again,
> Jake
>
> Also, I didn't do the chicken thing, so that might be it...
>
>
> ________________________________________
> From: David Lawrence [davidl@jlab.org]
> Sent: Wednesday, May 20, 2009 9:50 AM
> To: Matthew Shepherd
> Cc: Bennett, Jake Vernon
> Subject: Re: curl and hdparsim
>
> Hi Matt,
>
> Attached are the CURL headers from my system, but they are for
> version 7.16.3. If you can get a hold of the correct headers for your
> installed version, you can try compiling it by putting them in an
> include path (e.g. $HALLD_HOME/include/curl). You will want to remove
> the "CURL" from the PACKAGES line in the Makefile to make it:
>
> PACKAGES := ROOT:DANA
>
> You'll also need to add the curl library and dependencies to the
> Makefile via MISC_LIBS. Something like this:
>
> MISC_LIBS += -lcurl -lssl -lcrypto -lz
>
> Then cross your fingers, turn around three times and sacrifice a chicken
> and it might work.
>
> Regards,
> -Dave
>
> Matthew Shepherd wrote:
>
>> Hi David,
>>
>> Yes, it seems like we don't have the development package. I don't see
>> any sign of the header. Is there anyway we can hack around it for
>> now? Our sysadmin is on vacation until next week and I don't know how
>> to install packages on the cluster. As an alternative, I suppose Jake
>> could download the curl package and make a private install somewhere
>> in one of his directories.
>>
>> -Matt
>>
>> On May 20, 2009, at 9:32 AM, David Lawrence wrote:
>>
>>
>>> Hi Matt,
>>>
>>> Perhaps you have curl but not curl-devel? You can always mess with
>>> the makefile to try and get it to work, but I think you'll at least
>>> need the headers and I'm wondering if they are not there since
>>> curl-config is not there. I've not built it myself without the
>>> curl-config.
>>>
>>> Regards,
>>> -David
>>>
>>> Matthew Shepherd wrote:
>>>
>>>> Hi Dave,
>>>>
>>>> Jake is trying to get hdparsim running so that we can do some
>>>> physics simulations on channels with tracks. He's running into
>>>> trouble building the code. It looks like the makefile needs an
>>>> executable called curl-config. We have curl on our system, but no
>>>> curl-config. Is there a way around this?
>>>>
>>>> Thanks,
>>>>
>>>> Matt
>>>>
>>> --
>>>
>>> ------------------------------------------------------------------------
>>> David Lawrence Ph.D.
>>> Staff Scientist Office: (757)269-5567 [[[ [ [
>>> [ Jefferson Lab Pager: (757)584-5567 [ [
>>> [ [ [ [ http://www.jlab.org/~davidl davidl@jlab.org
>>> [[[ [[ [[ [[[
>>> ------------------------------------------------------------------------
>>>
>>>
>>>
>
> --
>
> ------------------------------------------------------------------------
> David Lawrence Ph.D.
> Staff Scientist Office: (757)269-5567 [[[ [ [ [
> Jefferson Lab Pager: (757)584-5567 [ [ [ [ [ [
> http://www.jlab.org/~davidl davidl@jlab.org [[[ [[ [[ [[[
> ------------------------------------------------------------------------
>
>
>
>
--
------------------------------------------------------------------------
David Lawrence Ph.D.
Staff Scientist Office: (757)269-5567 [[[ [ [ [
Jefferson Lab Pager: (757)584-5567 [ [ [ [ [ [
http://www.jlab.org/~davidl davidl@jlab.org [[[ [[ [[ [[[
------------------------------------------------------------------------
--
------------------------------------------------------------------------
David Lawrence Ph.D.
Staff Scientist Office: (757)269-5567 [[[ [ [ [
Jefferson Lab Pager: (757)584-5567 [ [ [ [ [ [
http://www.jlab.org/~davidl davidl@jlab.org [[[ [[ [[ [[[
------------------------------------------------------------------------