Project

General

Profile

Bug #287

undefined reference to phtread_*

Added by over 11 years ago. Updated over 10 years ago.

Status:
Closed
Priority:
High
Target version:
Start date:
Due date:
% Done:

0%

Resolution:
fixed

Description

When trying to compile libprelude on [[FreeBSD]] 6.x I get the following message:

...
gcc -std=gnu99 -g -O2 -z relro -z now -o .libs/prelude-admin prelude-admin.o server.o tls-register.o ../src/.libs/config-engine.o ../src/.libs/variable.o  ../src/.libs/libprelude.so -L/usr/local/lib /usr/local/lib/libgnutls.so -lz /usr/local/lib/libgcrypt.so /usr/local/lib/libgpg-error.so /usr/local/lib/libintl.so /usr/local/lib/libiconv.so ../libmissing/.libs/libmissing.a  -Wl,--rpath -Wl,/data3/tmp/prelude/lib -Wl,--rpath -Wl,/usr/local/lib
/usr/bin/ld: warning: libintl.so.6, needed by /usr/local/lib/libgpg-error.so, may conflict with libintl.so.8
../src/.libs/libprelude.so: undefined reference to @pthread_create'
../src/.libs/libprelude.so: undefined reference to @pthread_exit'
../src/.libs/libprelude.so: undefined reference to @pthread_condattr_init'
../src/.libs/libprelude.so: undefined reference to @pthread_join'
../src/.libs/libprelude.so: undefined reference to @pthread_cond_timedwait'
*** Error code 1

Stop in /data3/tmp/libprelude/work/libprelude-0.9.17.1/prelude-admin.
*** Error code 1

Stop in /data3/tmp/libprelude/work/libprelude-0.9.17.1.
*** Error code 1

Stop in /data3/tmp/libprelude/work/libprelude-0.9.17.1.

Here is an overview of installed packages, which are required by libprelude:

gnutls-2.2.2
libgpg-error-1.4_1
libgcrypt-1.4.0

I have attached the config.log for further references.

Kind regards,

Robin

default.htm View - config.log of libprelude-0.9.17.1 (1.27 KB) , 05/05/2008 09:34 AM

config.log.gz - config.log of libprelude-0.9.17.1 (38.3 KB) , 05/05/2008 09:35 AM

default.2.htm View - libprelude-0.9.16.1 build log (1.3 KB) , 05/05/2008 03:32 PM

libprelude-0.9.16.1.log.gz - libprelude-0.9.16.1 build log (10.7 KB) , 05/05/2008 03:33 PM

libprelude-0.9.17.log.gz - libprelude-0.9.17 build log (10.8 KB) , 05/05/2008 03:33 PM

pthread-weak.diff View - Declare pthread symbols weak - v3 (5.23 KB) Yoann VANDOORSELAERE, 05/06/2008 03:29 PM

History

#1 Updated by Yoann VANDOORSELAERE over 11 years ago

  • Status changed from New to Assigned

Hi Robin,

Are you able to reproduce the problem with libprelude-0.9.16? Or is the problem system specific?

Regards,

#2 Updated by over 11 years ago

I have no issues with libprelude-0.9.16.1. The problem started with libprelude-0.9.17.

#3 Updated by over 11 years ago

For the record, I have already solved the libgpg-error warning message. Altough it didn't solve the libprelude problem.

Regards,

Robin

#4 Updated by Yoann VANDOORSELAERE over 11 years ago

Thanks for the information. Could you please provide the full compilation logs for both libprelude 0.9.16.1 and 0.9.17? It should help tracking the regression down.

#5 Updated by over 11 years ago

Yoann,

I have attached two build logs. One is from libprelude-0.9.16.1 and the other if from libprelude-0.9.17.

Regards,

Robin

#6 Updated by Yoann VANDOORSELAERE over 11 years ago

After running the configure script, does editing src/Makefile and prelude-admin/Makefile, and changing:

LDFLAGS =  -z relro -z now

to:

LDFLAGS = 

then running make solve the problem?

#7 Updated by over 11 years ago

Nope same problem.

Replying to [comment:6 yoann]:

After running the configure script, does editing src/Makefile and prelude-admin/Makefile, and changing:

> LDFLAGS =  -z relro -z now

to:

> LDFLAGS = 

then running make solve the problem?

#8 Updated by Yoann VANDOORSELAERE over 11 years ago

Please try the attached patch, and let me know if it fixes the problem (or even change the undefined symbols list).

#9 Updated by over 11 years ago

Nope same problems:

...
../src/.libs/libprelude.so: undefined reference to @pthread_create'
../src/.libs/libprelude.so: undefined reference to @pthread_exit'
../src/.libs/libprelude.so: undefined reference to @pthread_condattr_init'
../src/.libs/libprelude.so: undefined reference to @pthread_join'
../src/.libs/libprelude.so: undefined reference to @pthread_cond_timedwait'
*** Error code 1

Replying to [comment:8 yoann]:

Please try the attached patch, and let me know if it fixes the problem (or even change the undefined symbols list).

#10 Updated by Yoann VANDOORSELAERE over 11 years ago

Attached a newer version of the patch, please let me know whether it help.

#11 Updated by over 11 years ago

Almost!

...
../src/.libs/libprelude.so: undefined reference to @pthread_exit'
*** Error code 1
...

Replying to [comment:11 yoann]:

Attached a newer version of the patch, please let me know whether it help.

#12 Updated by Yoann VANDOORSELAERE over 11 years ago

Could you confirm that this latest attachment fix the issue? Additionally, testing in conjunction with external Prelude sensors (example: Snort, Samhain or OSSEC), would be great.

Thanks!

#13 Updated by over 11 years ago

Works fine. Although I tested only with Snort as a external Prelude sensor.

#14 Updated by Yoann VANDOORSELAERE over 11 years ago

  • Status changed from Assigned to Closed
  • Resolution set to fixed

(In r10569) Define pthread weak symbols when support. Fix unresolved symbols
on some architecture (fix #287).

#15 Updated by Yoann VANDOORSELAERE over 10 years ago

  • Project changed from PRELUDE SIEM to Libprelude
  • Category deleted (1)
  • Target version deleted (0.9.18)

Also available in: Atom PDF