bugGnash - The GNU Flash player - Bugs: bug #21977, Greedy sed expression constructs...

 
 

bug #21977: Greedy sed expression constructs bad ac_cv_path_boost_lib and ac_cv_path_boost_extra_lib

Submitter:  None
Submitted:  Mon 07 Jan 2008 07:34:06 PM UTC
   
 
Category:  build Severity:  3 - Normal
Release:  None Status:  Fixed
Privacy:  Public Assigned to:  rsavoye
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Tue 24 Mar 2009 10:37:21 AM UTC, comment #7: 

Closing due to over a year's inactivity.

Benjamin Wolsey <bwy>
Group Member
Sat 19 Jan 2008 06:36:49 PM UTC, comment #6: 

I also get this error:

/usr/lib/gcc/x86_64-pc-linux-gnu/4.2.2/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib64/libboost_thread-mt-s.a(thread.o): relocation R_X86_64_PC32 against `boost::thread::thread(boost::function0<void, std::allocator<boost::function_base> > const&)' can not be used when making a shared object; recompile with -fPIC
/usr/lib/gcc/x86_64-pc-linux-gnu/4.2.2/../../../../x86_64-pc-linux-gnu/bin/ld: final link failed: Bad value

it is because gentoo has this boost thread libs:
/usr/lib64/libboost_thread.so
/usr/lib64/libboost_thread-mt.so
/usr/lib64/libboost_thread-mt-s.a

and amd64 can't link against libboost_thread-mt-s.a without -fPIC

so I have added a patch to stop linking against *.a libraries.

I don't know if it is a proper solution though.

(file #14837)

Anonymous
Wed 16 Jan 2008 12:46:45 AM UTC, comment #5: 

I fixed this a different way, so please try it now.

Rob Savoye <rsavoye>
Group administrator
Tue 15 Jan 2008 09:26:28 PM UTC, comment #4: 

ad-mt-s -lboost_date_time-mt-s -lboost_serialization-mt-s -lpthread   -lc -lrt -lX11 -lXi -lm
x86_64-pc-linux-gnu-g++ -shared -nostdlib /usr/lib/gcc/x86_64-pc-linux-gnu/4.2.2/../../../../lib64/crti.o /usr/lib/gcc/x86_64-pc-linux-gnu/4.2.2/crtbeginS.o  .libs/libgnashbase_la-config.o .libs/libgnashbase_la-extension.o .libs/libgnashbase_la-image.o .libs/libgnashbase_la-jpeg.o .libs/libgnashbase_la-lirc.o .libs/libgnashbase_la-log.o .libs/libgnashbase_la-membuf.o .libs/libgnashbase_la-network.o .libs/libgnashbase_la-postscript.o .libs/libgnashbase_la-rc.o .libs/libgnashbase_la-shm.o .libs/libgnashbase_la-sharedlib.o .libs/libgnashbase_la-string_table.o .libs/libgnashbase_la-tu_file.o .libs/libgnashbase_la-tu_timer.o .libs/libgnashbase_la-WallClockTimer.o .libs/libgnashbase_la-utf8.o .libs/libgnashbase_la-utility.o .libs/libgnashbase_la-curl_adapter.o .libs/libgnashbase_la-noseek_fd_adapter.o .libs/libgnashbase_la-zlib_adapter.o .libs/libgnashbase_la-URL.o .libs/libgnashbase_la-LoadThread.o .libs/libgnashbase_la-FLVParser.o .libs/libgnashbase_la-GC.o .libs/libgnashbase_la-BitsReader.o  /usr/lib64/libjpeg.so -L/lib -lz -L/usr/lib64 /usr/lib64/libcurl.so /usr/lib64/libltdl.so -lboost_thread-mt-s -lboost_date_time-mt-s -lboost_serialization-mt-s -lpthread -lrt /usr/lib64/libX11.so /usr/lib64/libXi.so -L/usr/lib/gcc/x86_64-pc-linux-gnu/4.2.2 -L/usr/lib/gcc/x86_64-pc-linux-gnu/4.2.2/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/usr/lib/gcc/x86_64-pc-linux-gnu/4.2.2/../../../../x86_64-pc-linux-gnu/lib -L/usr/lib/gcc/x86_64-pc-linux-gnu/4.2.2/../../.. -lstdc++ -lm -lc -lgcc_s /usr/lib/gcc/x86_64-pc-linux-gnu/4.2.2/crtendS.o /usr/lib/gcc/x86_64-pc-linux-gnu/4.2.2/../../../../lib64/crtn.o  -march=nocona -pthread -Wl,--as-needed -Wl,-soname -Wl,libgnashbase-cvs.so -o .libs/libgnashbase-cvs.so
/usr/lib/gcc/x86_64-pc-linux-gnu/4.2.2/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib64/libboost_thread-mt-s.a(thread.o): relocation R_X86_64_PC32 against `boost::thread::thread(boost::function0<void, std::allocator<boost::function_base> > const&)' can not be used when making a shared object; recompile with -fPIC
/usr/lib/gcc/x86_64-pc-linux-gnu/4.2.2/../../../../x86_64-pc-linux-gnu/bin/ld: final link failed: Bad value
collect2: ld returned 1 exit status
make[2]: * [libgnashbase.la] Error 1
make[2]: Leaving directory `/var/tmp/portage/net-www/gnash-99999999/work/gnash/libbase'
make[1]: * [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/net-www/gnash-99999999/work/gnash'
make: * [all] Error 2



I had to revert the patch to get it to build.  This is running Gentoo hardened.  You can see the build failure above.

Anonymous
Mon 07 Jan 2008 09:51:37 PM UTC, comment #3: 

If you think you schould mention my name... I'm Matthias Berndt.
Matthias Berndt<berndt.matthias@gmx.de>

Matthias Berndt <mbe>
Mon 07 Jan 2008 09:34:11 PM UTC, comment #2: 

Committed patch1, if/when you give your name I'll update the ChangeLog.

Sandro Santilli <strk>
Group Member
Mon 07 Jan 2008 09:08:25 PM UTC, comment #1: 

With the second patch I get wrong detection:

        BOOST libs are:  -lboost_thread-gcc41-mt-1_34_1.a -lboost_date_time-gcc41-1_34_1.a -lboost_serialization-gcc41-1_34_1.a
        BOOST Extra libs are:  -lboost_unit_test_framework-gcc41-1_34_1.a


I guess the first 'dot-stripping' thing is to remove the
final extention... anchoring to end of line could do a better
job.

First patch seems good to me, what's your name for a ChangeLog entry ?

Sandro Santilli <strk>
Group Member
Mon 07 Jan 2008 07:34:06 PM UTC, original submission:  

The sed expression "sed -e 's:\..*$::' -e 's:^.*/lib::'" constructs a bad ac_cv_path_boost_lib and ac_cv_path_boost_extra_lib when the path, at this point the $dirs variable, contains dots.

For example:
"/opt/boost/1.34.1/lib/libboost_unit_test_framework.so" becomes "/opt/boost/1" because of the dot in the path.

I attached to patches against the current HEAD.

The first one simple changes the expression order. This prevents the possibility for 's:\..*$::' to be to greedy.

The second an may be better one changes the expression to match all characters except a dot.

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #14837:  gnash-boost.diff added by None (1KiB - text/plain)
file #14762:  gnash_boost_build_fix-1.patch added by None (1KiB - application/octet-stream)
file #14763:  gnash_boost_build_fix-2.patch added by None (1KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by bwy (Posted a comment)
  • -email is unavailable- added by rsavoye (Posted a comment)
  • -email is unavailable- added by mbe (Posted a comment)
  • -email is unavailable- added by strk (Posted a comment)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 10 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2009-03-24 bwy StatusReady For Test Fixed
        Open/ClosedOpen Closed
    2008-01-19 None Attached File- Added gnash-boost.diff, #14837
    2008-01-16 strk Open/ClosedClosed Open
    2008-01-16 rsavoye Assigned tostrk rsavoye
    2008-01-09 strk Open/ClosedOpen Closed
    2008-01-07 strk StatusNone Ready For Test
        Assigned toNone strk
    2008-01-07 None Attached File- Added gnash_boost_build_fix-1.patch, #14762
        Attached File- Added gnash_boost_build_fix-2.patch, #14763

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code