First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 172699
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: The Soldering-Iron Brotherhood <sci-electronics@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Ahmed Ammar <b33fc0d3@gentoo.org>
Add CC:
CC:
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 172699 depends on: Show dependency tree
Show dependency graph
Bug 172699 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)







View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2007-03-29 18:57 0000
Tested using some simple 1-bit adder code I had.

Please add ~amd64 keyword.

------- Comment #1 From Christian Faulhammer 2007-04-10 07:33:42 0000 -------
I ran the test from

http://dev.gentoo.org/~calchan/sci-electronics/tests/#doc_chap6

and got 
g++  -Wall -DSC_USE_PTHREADS -DSC_INCLUDE_FX -O3   -o fft  fft.o main.o sink.o
source.o  -L/tmp/systemc-2.2.05jun06_beta/lib-linux64 -lsystemc -lm 
/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/../../../../lib64/libsystemc.a(sc_cor_pthread.o):
In function `sc_core::sc_cor_pkg_pthread::create(unsigned long, void
(*)(void*), void*)':
: undefined reference to `pthread_create'
/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/../../../../lib64/libsystemc.a(sc_cor_pthread.o):
In function `sc_core::sc_cor_pkg_pthread::create(unsigned long, void
(*)(void*), void*)':
: undefined reference to `pthread_attr_setstacksize'
collect2: ld returned 1 exit status
make[4]: *** [fft] Error 1
make[4]: Leaving directory
`/tmp/systemc-2.2.05jun06_beta/examples/sysc/fft/fft_flpt'
make[3]: *** [check-am] Error 2
make[3]: Leaving directory
`/tmp/systemc-2.2.05jun06_beta/examples/sysc/fft/fft_flpt'
make[2]: *** [check-recursive] Error 1
make[2]: Leaving directory `/tmp/systemc-2.2.05jun06_beta/examples/sysc/fft'
make[1]: *** [check-recursive] Error 1
make[1]: Leaving directory `/tmp/systemc-2.2.05jun06_beta/examples/sysc'
make: *** [check-recursive] Error 1

------- Comment #2 From Denis Dupeyron 2007-04-11 06:41:31 0000 -------
(In reply to comment #1)
> I ran the test from
> 
> http://dev.gentoo.org/~calchan/sci-electronics/tests/#doc_chap6
> 
> and got 
> g++  -Wall -DSC_USE_PTHREADS -DSC_INCLUDE_FX -O3   -o fft  fft.o main.o sink.o
> source.o  -L/tmp/systemc-2.2.05jun06_beta/lib-linux64 -lsystemc -lm 
> /usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/../../../../lib64/libsystemc.a(sc_cor_pthread.o):
> In function `sc_core::sc_cor_pkg_pthread::create(unsigned long, void
> (*)(void*), void*)':
> : undefined reference to `pthread_create'
> /usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/../../../../lib64/libsystemc.a(sc_cor_pthread.o):
> In function `sc_core::sc_cor_pkg_pthread::create(unsigned long, void
> (*)(void*), void*)':
> : undefined reference to `pthread_attr_setstacksize'
> collect2: ld returned 1 exit status

I don't have an amd64 machine, but I could use one last week for a few minutes
and I did have the same issue. Unfortunately I won't be able to use it for more
than this, so could you please have a look at it and try to isolate the source
of the problem ?

It looks to me like maybe some gthread/pthread conflict. That -DSC_USE_PTHREADS
option to g++ certainly looks like a good lead to start investigating. Maybe
the option needs to be removed, or the order of '-lsystemc -lm' needs to be
inverted, or something. If you can't find out what it is, could you please
check with somebody else in the amd64 team ?

Thanks in advance,
Denis.

------- Comment #3 From Christian Faulhammer 2007-04-11 06:53:59 0000 -------
(In reply to comment #2)
> so could you please have a look at it and try to isolate the source
> of the problem ?

 If you help me debug...yes.

> It looks to me like maybe some gthread/pthread conflict. That -DSC_USE_PTHREADS
> option to g++ certainly looks like a good lead to start investigating. Maybe
> the option needs to be removed, or the order of '-lsystemc -lm' needs to be
> inverted, or something. If you can't find out what it is, could you please
> check with somebody else in the amd64 team ?

 Removing -DSC_USE_PTHREADS and inverting the order, gives me:

g++  -Wall  -DSC_INCLUDE_FX -O3   -o fft  fft.o main.o sink.o source.o 
-L/tmp/systemc-2.2.05jun06_beta/lib-linux64 -lm -lsystemc 
/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/../../../../x86_64-pc-linux-gnu/bin/ld:
cannot find -lsystemc
collect2: ld returned 1 exit status



------- Comment #4 From Ahmed Ammar 2007-04-11 14:52:36 0000 -------
Ok the problem here is with the Makefile.in and Makefile.am files not including
-lpthread.

A quick fix;
cd examples

find . -type f -name 'Makefile.*' -print |
while read filename
do
  (
  sed 's/\-lm/\-lm\ \-lpthread/i;' $filename > $filename.xxxx
  mv $filename.xxxx $filename
  )
done

Regenerate the makefiles by re-running the ./configure script and it should all
compile fine.

------- Comment #5 From Christian Faulhammer 2007-04-12 06:18:24 0000 -------
(In reply to comment #4)
> Regenerate the makefiles by re-running the ./configure script and it should all
> compile fine.

 Quick answer: No. :)

make[4]: Entering directory
`/tmp/systemc-2.2.05jun06_beta/examples/sysc/fft/fft_flpt'
g++  -Wall -DSC_USE_PTHREADS -DSC_INCLUDE_FX -O3   -o fft  fft.o main.o sink.o
source.o  -L/tmp/systemc-2.2.05jun06_beta/lib-linux64 -lsystemc -lm -lpthread
-lpthread 
/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/../../../../x86_64-pc-linux-gnu/bin/ld:
cannot find -lsystemc
collect2: ld returned 1 exit status
make[4]: *** [fft] Error 1

------- Comment #6 From Denis Dupeyron 2007-04-12 06:35:15 0000 -------
(In reply to comment #5)
>  Quick answer: No. :)
> 
> make[4]: Entering directory
> `/tmp/systemc-2.2.05jun06_beta/examples/sysc/fft/fft_flpt'
> g++  -Wall -DSC_USE_PTHREADS -DSC_INCLUDE_FX -O3   -o fft  fft.o main.o sink.o
> source.o  -L/tmp/systemc-2.2.05jun06_beta/lib-linux64 -lsystemc -lm -lpthread
> -lpthread 
> /usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/../../../../x86_64-pc-linux-gnu/bin/ld:
> cannot find -lsystemc

Christian, what you have here is that it can't find the systemc library, as if
systemc wasn't installed. Are you sure you didn't unmerge it ?

Denis.

------- Comment #7 From Christian Faulhammer 2007-04-12 07:09:05 0000 -------
> Christian, what you have here is that it can't find the systemc library, as if
> systemc wasn't installed. Are you sure you didn't unmerge it ?

 OMFG....if we should ever meet in person you are allowed to kick my butt, for
not properly reading error messages I post on bugs.

It works!  I keyworded it ~amd64 and maybe you could check if this is fixed
upstream.

------- Comment #8 From Denis Dupeyron 2007-04-12 09:21:10 0000 -------
Thanks to both of you. I reopen this bug as a tracker to include the fix in the
postinstall message and my test bench.

Denis.

------- Comment #9 From Denis Dupeyron 2007-04-20 09:32:57 0000 -------
(In reply to comment #8)
> Thanks to both of you. I reopen this bug as a tracker to include the fix in the
> postinstall message and my test bench.

Both are now fixed, closing this.

Denis.

First Last Prev Next    No search results available      Search page      Enter new bug