bugDotGNU Portable.NET - Bugs: bug #19237, pnet-0.8.0 configuration may fail...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #19237: pnet-0.8.0 configuration may fail to recognize the correct thread model under glibc>=2.4

Submitter:  None
Submitted:  Thu 08 Mar 2007 08:28:12 AM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  None
Open/Closed:  Closed

Jump to the original submission

Sat 24 Mar 2007 05:16:57 PM UTC, comment #6: 

The attached patch has been applied to cvs.

Klaus Treichel <ktreichel>
Group administrator
Fri 23 Mar 2007 08:24:53 AM UTC, comment #5: 

The patch seems to fix things: I can build with thread support out of the box with a simple ./configure (i.e. no explicit --enable-threads required any more)

I've only noticed that also libffi/configure is called with the --enable-threads option, where it does not seem to have one: should be harmless, however.


Thanks a lot

Anonymous
Thu 22 Mar 2007 07:14:59 PM UTC, comment #4: 

I've attached a patch that might fix the issue.

Can you try and see if it's ok ?

(file #12236)

Klaus Treichel <ktreichel>
Group administrator
Thu 22 Mar 2007 03:10:42 PM UTC, comment #3: 

Hi,

just having some spare time and looked at libgc docs.

I don't know if you have done some progress on this.

As far as I seem to understand, gc requires explicit thread support  option.
From README.QUICK:
"If you need thread support, you will need to either follow the special platform-dependent instructions (win32), or add a suitable define option as described in Makefile."

On the other hand, pnet configure switches thread support on if it finds the conditions.

So:
=> either you change pnet idea about thread support, making it     require an explicit option to be supplied (and change accordingly installation instructions)
=> or you change gc configure to make it guess, similarly to pnet's configure

From the installer's point of view (i.e. me) I would say it's better and cleaner that thread support is switched on based on (intelligent) guess: so one just says ./configure and all the available features found on the system are included. (if one
does NOT want an otherwise available feature, then that's her responsibility to explicitly disable it, isn't it?) Well, I guess that this is the reason why autoconf has been created, after all.

I don't know what is the best way to implement this: perhaps call gc's configure with --enable-threads if pnet's configure has found the good conditions...


Hope to be of any use
Ciao
Gabriele

Anonymous
Thu 08 Mar 2007 07:15:33 PM UTC, comment #2: 

Thanks for the hint.

The configure.in script in libgc is an allmost 1:1 copy of the libgc 6.8 release.

So i think this issue has to be posted upstream.

I'll send this to the libgc mailing list too.


Klaus Treichel <ktreichel>
Group administrator
Thu 08 Mar 2007 09:17:23 AM UTC, comment #1: 

Sorry, I forgot to give OS specs:


Linux kernel 2.6.20.1 #1 Thu Feb 22 08:57:58 CET 2007 i686 GNU/Linux

cheers
gabriele

Anonymous
Thu 08 Mar 2007 08:28:12 AM UTC, original submission:  

Apologies if I'm wrong.

When building pnet-0.8.0 under glibc>=2.4 the configuration
process may fail in the absence of an explicit
--enable-threads=... option.

glibc>=2.4 has dropped support for linuxthreads (almost) and
supports only NPTL.

As a consequence, in order to build gcc against glibc>=2.4
one has to use --disable-threads (or the equivalent
--enable-threads=single). This, in turn, implies that "gcc
-v" will emit:

     Using built-in specs.
     Target: i686-pc-linux-gnu
     Configured with: ../configure \
                --prefix=/usr/local/gcc-4.1.2 \
                --disable-threads --enable-__cxa_atexit
     vvvvvvvvvvvvvvvvvvvv
     Thread model: single
     ^^^^^^^^^^^^^^^^^^^^
     gcc version 4.1.2

Now, pnet-0.8.0/configure will capture the correct thread
model in either presence or absence of --enable-threads
option, since it tests the $host variable to make a decision
when --enable-threads has not been given.

However, in pnet-0.8.0/libgc/configure the $host variable is
not tested and only the output of "gcc -v" is considered (in
the absence of --enable-threads option). Since "gcc -v"
returns "Thread model: single" when built against
glibc>=2.4, pnet-0.8.0/libgc/configure assumes no threads
and compilation crashes.

No problem if one configures with --enable-threads=posix,
but I'm wondering whether things should go smoothly also
when one issues a simple "configure" without any option (as
it used to work in the past).



Anonymous

 

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

Attached Files
file #12236:  kt-070322.patch added by ktreichel (1KiB - text/x-patch - Patch for fixing the thread issue with configuring libgc)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by ktreichel (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.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2007-03-24 ktreichel StatusNone Fixed
        Open/ClosedOpen Closed
    2007-03-22 ktreichel Attached File- Added kt-070322.patch, #12236

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code