WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: undefined reference to `std::tr1::__detail::__prime_list'  (Read 16430 times)

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
undefined reference to `std::tr1::__detail::__prime_list'
« on: June 24, 2010, 01:11:56 PM »
Compiling an application (fldigi) on TC 3.0 Alpha 7/8 I get the following error message:

Quote
spot.cxx:(.text+0x1c9): undefined reference to `std::tr1::__detail::__prime_list'
fldigi-spot.o: In function `T.495':
spot.cxx:(.text+0x292): undefined reference to `std::tr1::__detail::__prime_list'
collect2: ld returned 1 exit status
make[2]: *** [fldigi] Error 1

which seems to be related to stdlib.

Any idea?
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline gutmensch

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 605
  • I can make it disappear, have no fear!
    • remembrance blog
Re: undefined reference to `std::tr1::__detail::__prime_list'
« Reply #1 on: June 24, 2010, 02:54:57 PM »
Maybe some libtool or base-dev libstdc++ error? G00gle shows the same error http://bugs.gentoo.org/284710 and the solution seems to be:

Quote
You have a link issue due to fact that your using gcc-4.3.3 when your libfiles
are locating gcc-4.4.1 libstdc++. Please run  fix_libtool_files.sh 4.1.1 (...)

If I seem unduly clear to you, you must have misunderstood what I said. (Alan Greenspan)

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: undefined reference to `std::tr1::__detail::__prime_list'
« Reply #2 on: June 25, 2010, 03:00:25 AM »
Thanks for the link. According to this it is a mismatch in the compile environment. I just made a clean install of TC 3.0 to be sure to have all latest extensions but see the same issue.

Haven't tried latest 2.11.5. In the past it was not possible to compile this application due to misc. limitations.

Now would be good to check environment by core developers.
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: undefined reference to `std::tr1::__detail::__prime_list'
« Reply #3 on: June 25, 2010, 05:02:22 AM »
I remastered 2.11.5 replacing fltk libraries with versions compiled with --enable-threads options. Now application compiles without error message. I get run-time error so it still doesn't work, but it is another story.

It verifies the issue with the TC 3.0 compilation environment.
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14756
Re: undefined reference to `std::tr1::__detail::__prime_list'
« Reply #4 on: June 26, 2010, 04:46:17 AM »
There might be a couple of issues here:

1. An error coming from libfltk (maybe) not being (re)compiled against the updated libstdc++/libgcc_s in the base.
2. A mismatch between the fltk libs in the base and the dev files in base-dev, though I don't see anything obvious

If you recompile on tc-3 without "enable-threads" do you get the same error?

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: undefined reference to `std::tr1::__detail::__prime_list'
« Reply #5 on: June 26, 2010, 05:32:19 AM »
There might be a couple of issues here:

1. An error coming from libfltk (maybe) not being (re)compiled against the updated libstdc++/libgcc_s in the base.
2. A mismatch between the fltk libs in the base and the dev files in base-dev, though I don't see anything obvious

If you recompile on tc-3 without "enable-threads" do you get the same error?

I get the same error compiling with TC base or with fltk libs replaced with threads-enabled. Did not recompile fltk with threads disabled, as basically fltk libs look OK in the base except threads and possibly xft, but it will come later.

All together threading issue is solved. Application itself need threeding. problem must be somwhere around libstdc++-libgcc and not fltk :(

If it helps, I can send you build script, fldigi source and recompiled fltk for debugging.
« Last Edit: June 26, 2010, 05:33:53 AM by bmarkus »
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14756
Re: undefined reference to `std::tr1::__detail::__prime_list'
« Reply #6 on: June 26, 2010, 08:47:35 AM »
If it helps, I can send you build script, fldigi source and recompiled fltk for debugging.

Sure, go ahead

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14756
Re: undefined reference to `std::tr1::__detail::__prime_list'
« Reply #7 on: July 01, 2010, 07:26:16 AM »
The start of the error looks to be:
Code: [Select]
g++ -I/usr/local/include -march=i486 -mtune=i686 -Os -pipe -fexceptions -frtti
-D_THREAD_SAFE -D_REENTRANT -I/usr/local/include -I/usr/local/include -I/usr/include/libpng12 -pipe -Wall -fexceptions  -ffast-math
-finline-functions  -fno-inline-functions -ggdb3 -Wall -UNDEBUG  -rdynamic  -o fldigi  fldigi-locator.o      fldigi-nls.o  fldigi-combo.o
fldigi-cw.o fldigi-morse.o fldigi-rtty.o fldigi-contestia.o fldigi-colorsfonts.o fldigi-confdialog.o fldigi-fl_digi.o fldigi-font_browser.o
fldigi-Viewer.o fldigi-htmlstrings.o fldigi-notifydialog.o fldigi-thor.o fldigi-thorvaricode.o fldigi-dominoex.o fldigi-dominovar.o fldigi-feld.o
fldigi-feldfonts.o fldigi-fft.o fldigi-Fl_Native_File_Chooser.o fldigi-fileselect.o fldigi-fftfilt.o fldigi-filters.o fldigi-viterbi.o fldigi-globals.o
fldigi-irrXML.o fldigi-adif_io.o fldigi-calendar.o fldigi-date.o fldigi-lgbook.o fldigi-logbook.o fldigi-logsupport.o fldigi-qso_db.o fldigi-table.o
fldigi-textio.o fldigi-logger.o fldigi-rx_extract.o fldigi-speak.o fldigi-main.o fldigi-interleave.o fldigi-mfsk.o fldigi-mfskvaricode.o fldigi-ascii.o
fldigi-configuration.o fldigi-debug.o fldigi-dxcc.o fldigi-flstring.o fldigi-icons.o fldigi-log.o fldigi-macroedit.o fldigi-macros.o fldigi-misc.o
fldigi-network.o fldigi-newinstall.o fldigi-arq_io.o fldigi-lookupcall.o fldigi-pixmaps.o fldigi-qrzlib.o fldigi-re.o fldigi-socket.o fldigi-stacktrace.o
fldigi-status.o fldigi-strutil.o fldigi-threads.o fldigi-timeops.o fldigi-util.o fldigi-dsp.o fldigi-mt63.o fldigi-mt63base.o fldigi-olivia.o fldigi-psk.o
fldigi-pskcoeff.o fldigi-pskvaricode.o fldigi-viewpsk.o fldigi-pskeval.o fldigi-qrunner.o fldigi-FreqControl.o fldigi-ptt.o fldigi-rigMEM.o fldigi-rigio.o
fldigi-rigsupport.o fldigi-rigxml.o fldigi-serial.o fldigi-rsid.o fldigi-mixer.o fldigi-sound.o fldigi-soundconf.o fldigi-notify.o fldigi-pskrep.o
fldigi-spot.o fldigi-ssb.o fldigi-throb.o fldigi-modem.o fldigi-trx.o fldigi-colorbox.o fldigi-digiscope.o fldigi-raster.o fldigi-waterfall.o
fldigi-FTextView.o fldigi-FTextRXTX.o fldigi-Fl_Text_Buffer_mod.o fldigi-Fl_Text_Display_mod.o fldigi-Fl_Text_Editor_mod.o
fldigi-Fl_Tile_Check.o fldigi-flinput2.o fldigi-flmisc.o fldigi-flslider2.o fldigi-picture.o fldigi-progress.o fldigi-analysis.o fldigi-wwv.o
-L/usr/local/lib -Wl,-rpath,/usr/local/lib -lfltk_images -lpng -lz -ljpeg -lfltk -lpthread -ldl -lm -lXext -lX11
-lX11 -L/usr/local/lib -lsamplerate -lpng12  -ldl  -lrt  -lpthread 
fldigi-logsupport.o: In function `_Prime_rehash_policy':
/tmp/tcloop/gcc/usr/local/bin/../lib/gcc/i686-pc-linux-gnu/4.4.3/../../../../include/c++/4.4.3/tr1_impl/hashtable_policy.h:418:
undefined reference to `std::tr1::__detail::__prime_list'

I wonder if this is a problem with the symlinks being too deeply nested?

I'll continue working on this

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14756
Re: undefined reference to `std::tr1::__detail::__prime_list'
« Reply #8 on: July 01, 2010, 09:42:31 AM »
Got it - at some point, the tc-2 version of libstdc++ seems to have crept back into tc-3 (although the .a/.la files in base-dev are the correct ones)

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: undefined reference to `std::tr1::__detail::__prime_list'
« Reply #9 on: July 01, 2010, 11:46:27 AM »
Got it - at some point, the tc-2 version of libstdc++ seems to have crept back into tc-3 (although the .a/.la files in base-dev are the correct ones)

Sounds good. It was my expectetion too, that different versions are mixed up. Now, how to proceed?
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14756
Re: undefined reference to `std::tr1::__detail::__prime_list'
« Reply #10 on: July 01, 2010, 01:03:53 PM »
The next alpha cut will hopefully have the correct version in

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: undefined reference to `std::tr1::__detail::__prime_list'
« Reply #11 on: July 01, 2010, 01:41:19 PM »
The next alpha cut will hopefully have the correct version in

Fine, thanks.  :)
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline roberts

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 7361
  • Founder Emeritus
Re: undefined reference to `std::tr1::__detail::__prime_list'
« Reply #12 on: July 02, 2010, 09:55:51 AM »
The next alpha cut will hopefully have the correct version in
Confirmed.
10+ Years Contributing to Linux Open Source Projects.

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: undefined reference to `std::tr1::__detail::__prime_list'
« Reply #13 on: July 04, 2010, 03:30:46 PM »
Compiling with 3.0 Alpha 9 it looks OK error message is gone. At least this one  ;D Thanks for fixing it.
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."