Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: GnuPG: gcrypt

network.so: undefined symbol: gcry md hash buffer‏

 

 

GnuPG gcrypt RSS feed   Index | Next | Previous | View Threaded


honia2002 at hotmail

Jun 14, 2010, 6:55 AM

Post #1 of 4 (864 views)
Permalink
network.so: undefined symbol: gcry md hash buffer‏

Hi,

I am installing collectd-4.10.0 on a CentOS 5 machine:

1) Configured collectd: ./configure --with-librrd=/opt/rrdtool-1.4.3/
--with-liboping=/opt/oping
--with-libnetlink=/home/username/iproute2-2.6.29-1 --with-libgcrypt=/usr/lib

2) make followed by make install

3) Configured collectd.conf and this is the network plugin:

<Plugin network>
<Server "[IP adress here]" "25826">
SecurityLevel "Sign"
Username "client2"
Password "password2"
</Server>
# TimeToLive "128"
# Forward false
# CacheFlush 1800
# ReportStats false
</Plugin>

4) Restarted collectd and got the following error:

Stopping collectd: [FAILED]
Starting collectd: /opt/collectd/sbin/collectd: symbol lookup error:
/opt/collectd/lib/collectd/network.so: undefined symbol: gcry_md_hash_buffer


I looked everywhere to find the problem but had no luck. I installed the
same version of collectd on another machine exactly the steps above but it
went smoothly and had no problem.

Can someone please help me with this?

Thanks in advace,
honi@
--
View this message in context: http://old.nabble.com/network.so%3A-undefined-symbol%3A-gcry_md_hash_buffer%E2%80%8F-tp28879871p28879871.html
Sent from the GnuPG - Libgcrypt - Dev mailing list archive at Nabble.com.


_______________________________________________
Gcrypt-devel mailing list
Gcrypt-devel [at] gnupg
http://lists.gnupg.org/mailman/listinfo/gcrypt-devel


dkg at fifthhorseman

Jun 17, 2010, 7:14 AM

Post #2 of 4 (834 views)
Permalink
Re: network.so: undefined symbol: gcry_md_hash_buffer‏ [In reply to]

On 06/14/2010 09:55 AM, honi@ wrote:
> I am installing collectd-4.10.0 on a CentOS 5 machine:

I don't use collectd or CentOS, but i'm happy to help you debug:

> 4) Restarted collectd and got the following error:
>
> Stopping collectd: [FAILED]
> Starting collectd: /opt/collectd/sbin/collectd: symbol lookup error:
> /opt/collectd/lib/collectd/network.so: undefined symbol: gcry_md_hash_buffer


what output do you get from:

readelf -s /opt/collectd/lib/collectd/network.so | grep md_hash

ldd /opt/collectd/lib/collectd/network.so | grep gcry

readelf -s /usr/lib/libgcrypt.so.11 | grep md_hash

?

when i install debian's packaged collectd 4.9.1-2 on a testing system, i
see this on the equivalent files:

>> 0 dkg [at] pi:~$ readelf -s /usr/lib/collectd/network.so | grep md_hash
>> 87: 00000000 0 FUNC GLOBAL DEFAULT UND gcry_md_hash_buffer [at] GCRYPT_1 (5)
>> 0 dkg [at] pi:~$ ldd /usr/lib/collectd/network.so | grep gcry
>> libgcrypt.so.11 => /usr/lib/libgcrypt.so.11 (0xb7661000)
>> 0 dkg [at] pi:~$ readelf -s /usr/lib/libgcrypt.so.11 | grep md_hash
>> 101: 00006130 115 FUNC GLOBAL DEFAULT 13 gcry_md_hash_buffer@@GCRYPT_1.2
>> 0 dkg [at] pi:~$


i think these three lines of output mean:

/usr/lib/collectd/network.so expects to see
gcry_md_hash_bufer [at] GCRYPT1 in some library that it will load (it is
undefined internally, hence the "UND")

/usr/lib/collectd/network.so expects to load libgcrypt.so.11, which the
dynamic linker finds in /usr/lib

/usr/lib/libgcrypt.so.11 contains a defined symbol
gcry_md_hash_bufer [at] GCRYPT1

maybe one of these doesn't line up for you somehow?

--dkg
Attachments: signature.asc (0.87 KB)


honia2002 at hotmail

Jun 17, 2010, 7:52 AM

Post #3 of 4 (830 views)
Permalink
RE: networ k.so: undefined symb ol: gcry md hash buf fer [In reply to]

Good morning dkg,



Thanks for your helpful reply. I removed the collectd package and started over, this time gave collectd a different path for libgcrypt:

./configure --with-librrd=/opt/rrdtool-1.4.3/ --with-liboping=/opt/oping --with-libnetlink=/home/username/iproute2-2.6.29-1 --with-libgcrypt=/usr/local




I ran all your commands and here are the outputs: (in red)



1) readelf -s /opt/collectd/lib/collectd/network.so | grep md_hash

93: 00000000 0 NOTYPE GLOBAL DEFAULT UND gcry_md_hash_buffer
239: 00000000 0 NOTYPE GLOBAL DEFAULT UND gcry_md_hash_buffer

2) ldd /opt/collectd/lib/collectd/network.so | grep gcry

I got no output here

3) readelf -s /usr/lib/libgcrypt.so.11 | grep md_hash

109: 00005570 115 FUNC GLOBAL DEFAULT 11 gcry_md_hash_buffer@@GCRYPT_1.2

Somethings I noticed are:



1) Network.la has a line in it which reads:


# Libraries that this one depends upon.

dependency_libs=' -L/usr/local/lib -lpthread -ldl'




2) libgcrypt-config file is located here:

/usr/local/bin/libgcrypt-config

/home/username/libgcrypt-1.4.5/src/libgcrypt-config



3) In libgcrypt-config:



includedir = /usr/local/include

libdir=/usr/local/lib



4) Inside collectd's src directory's network.c there is a line which reads:



# if HAVE_LIBGCRYPT
# include <gcrypt.h>
GCRYPT_THREAD_OPTION_PTHREAD_IMPL
# endif




5) find / -name libgcrypt.so

/usr/local/lib/libgcrypt.so

/home/username/libgcrypt-1.4.5/src/.libs/libgcrypt.so



In the libgcrypt manual, it says that I have to do the following:


"If you want to compile a source file including the `gcrypt.h' header file, you must make sure that the compiler can find it in the directory hierarchy. This is accomplished by adding the path to the directory in which the header file is located to the compilers include file search path (via the -I option).
However, the path to the include file is determined at the time the source is configured. To solve this problem, Libgcrypt ships with a small helper program libgcrypt-config that knows the path to the include file and other configuration options. The options that need to be added to the compiler invocation at compile time are output by the --cflags option to libgcrypt-config. The following example shows how it can be used at the command line: " gcc -c foo.c `libgcrypt-config --cflags`



So I tried to link the network source code to libgcrypt library via command below but got so many errors.

gcc -c network.c `libgcrypt-config --cflags`




Thanks in advance for the help,

Honi@



> Date: Thu, 17 Jun 2010 10:14:19 -0400
> From: dkg [at] fifthhorseman
> To: honia2002 [at] hotmail
> CC: gcrypt-devel [at] gnupg
> Subject: Re: network.so: undefined symbol: gcry_md_hash_buffer
>
> On 06/14/2010 09:55 AM, honi@ wrote:
> > I am installing collectd-4.10.0 on a CentOS 5 machine:
>
> I don't use collectd or CentOS, but i'm happy to help you debug:
>
> > 4) Restarted collectd and got the following error:
> >
> > Stopping collectd: [FAILED]
> > Starting collectd: /opt/collectd/sbin/collectd: symbol lookup error:
> > /opt/collectd/lib/collectd/network.so: undefined symbol: gcry_md_hash_buffer
>
>
> what output do you get from:
>
> readelf -s /opt/collectd/lib/collectd/network.so | grep md_hash
>
> ldd /opt/collectd/lib/collectd/network.so | grep gcry
>
> readelf -s /usr/lib/libgcrypt.so.11 | grep md_hash
>
> ?
>
> when i install debian's packaged collectd 4.9.1-2 on a testing system, i
> see this on the equivalent files:
>
> >> 0 dkg [at] pi:~$ readelf -s /usr/lib/collectd/network.so | grep md_hash
> >> 87: 00000000 0 FUNC GLOBAL DEFAULT UND gcry_md_hash_buffer [at] GCRYPT_1 (5)
> >> 0 dkg [at] pi:~$ ldd /usr/lib/collectd/network.so | grep gcry
> >> libgcrypt.so.11 => /usr/lib/libgcrypt.so.11 (0xb7661000)
> >> 0 dkg [at] pi:~$ readelf -s /usr/lib/libgcrypt.so.11 | grep md_hash
> >> 101: 00006130 115 FUNC GLOBAL DEFAULT 13 gcry_md_hash_buffer@@GCRYPT_1.2
> >> 0 dkg [at] pi:~$
>
>
> i think these three lines of output mean:
>
> /usr/lib/collectd/network.so expects to see
> gcry_md_hash_bufer [at] GCRYPT1 in some library that it will load (it is
> undefined internally, hence the "UND")
>
> /usr/lib/collectd/network.so expects to load libgcrypt.so.11, which the
> dynamic linker finds in /usr/lib
>
> /usr/lib/libgcrypt.so.11 contains a defined symbol
> gcry_md_hash_bufer [at] GCRYPT1
>
> maybe one of these doesn't line up for you somehow?
>
> --dkg
>

_________________________________________________________________
Hotmail has tools for the New Busy. Search, chat and e-mail from your inbox.
http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_1


honia2002 at hotmail

Jun 23, 2010, 6:48 AM

Post #4 of 4 (822 views)
Permalink
Re: network.so: undefined symbol: gcry md hash buffer‏ [In reply to]

I contacted collectd folks but didn't get any replies.

Can you please let me know:

1) Where is the default installation directory for libgcrypt?

2) How to dynamically link it?

Thanks in advance
--
View this message in context: http://old.nabble.com/network.so%3A-undefined-symbol%3A-gcry_md_hash_buffer%E2%80%8F-tp28879871p28972079.html
Sent from the GnuPG - Libgcrypt - Dev mailing list archive at Nabble.com.


_______________________________________________
Gcrypt-devel mailing list
Gcrypt-devel [at] gnupg
http://lists.gnupg.org/mailman/listinfo/gcrypt-devel

GnuPG gcrypt RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.