Problem with gcc4.7 and call_once

Jeremy Huddleston Sequoia jeremyhu at macports.org
Thu Aug 8 23:45:31 PDT 2013


On Aug 8, 2013, at 20:22, Brian D. McGrew <brian at visionpro.com> wrote:

> Major updateŠ
> 
> Is ok, I can reinstall if I hosed it all :)
> 
> Download gcc-4.8.1.tar.bz2 from gnu and untar into ~/toolchain (no ports
> patches added to source).
> 
> Configure as follows (shown below). Make check, make install into
> /opt/local and it works.  The attached threading test program works.  The
> only thing I added that ports didn't is --enable-libstdcxx-threads.

So it should be the same since --enable-libstdcxx-threads is on by default.

Have you tried just adding --enable-libstdcxx-threads to the Portfile?  It should produce the exact same thing.  I think you're barking up the wrong tree here, but this is still a good data point, and I'll take a look when I can.

--Jeremy


> 40_ g++-mp-4.8 -v
> Using built-in specs.
> COLLECT_GCC=g++-mp-4.8
> COLLECT_LTO_WRAPPER=/opt/local/libexec/gcc/x86_64-apple-darwin12/4.8.1/lto-
> wrapper
> Target: x86_64-apple-darwin12
> Configured with: ../configure --prefix=/opt/local
> --build=x86_64-apple-darwin12
> --enable-languages=c,c++,objc,obj-c++,lto,fortran,java
> --libdir=/opt/local/lib/gcc48 --includedir=/opt/local/include/gcc48
> --infodir=/opt/local/share/info --mandir=/opt/local/share/man
> --datarootdir=/opt/local/share/gcc-4.8 --with-local-prefix=/opt/local
> --with-system-zlib --disable-nls --program-suffix=-mp-4.8
> --with-gxx-include-dir=/opt/local/include/gcc48/c++/ --with-gmp=/opt/local
> --with-mpfr=/opt/local --with-mpc=/opt/local --with-ppl=/opt/local
> --with-cloog=/opt/local --enable-cloog-backend=isl
> --disable-cloog-version-check --enable-stage1-checking --enable-lto
> --enable-libstdcxx-time --with-as=/opt/local/bin/as
> --with-ld=/opt/local/bin/ld --with-ar=/opt/local/bin/ar
> --with-bugurl=https://trac.macports.org/newticket
> --with-pkgversion='MacPorts gcc48 4.8.1_1+universal'
> --enable-libstdcxx-threads
> Thread model: posix
> gcc version 4.8.1 (MacPorts gcc48 4.8.1_1+universal)
> 41_ 
> 
> -b
> 
> 
> 
> 
>> You'll need to do that at the end of your build.
>> 
>> On Aug 8, 2013, at 14:51, David Barto <DBarto at visionpro.com> wrote:
>> 
>>> Start the install:
>>> 501_ sudo port install gcc48 +universal
>>> .
>>> Snip
>>> .
>>> --->  Applying patches to libstdcxx
>>> --->  Configuring libstdcxx
>>> --->  Building libstdcxx
>>> ^C
>>> 502_ pushd 
>>> /opt/local/.../_opt_local_var_macports_sources_rsync.macports.org_release
>>> _tarballs_ports_lang_gcc48/libstdcxx/work
>>> 
>>> 503_ find . -name 'config.log'
>>> ./build/build-x86_64-apple-darwin12/fixincludes/config.log
>>> ./build/build-x86_64-apple-darwin12/libiberty/config.log
>>> ./build/config.log
>>> ./build/fixincludes/config.log
>>> ./build/gcc/config.log
>>> ./build/intl/config.log
>>> ./build/libbacktrace/config.log
>>> ./build/libcpp/config.log
>>> ./build/libdecnumber/config.log
>>> ./build/libiberty/config.log
>>> 524_ find . -name 'config.log' | xargs egrep _GLIBCXX_HAS_GTHREADS
>>> 
>>> On Aug 8, 2013, at 2:08 PM, Jeremy Lavergne
>>> <jeremy at lavergne.gotdns.org> wrote:
>>> 
>>>> Look inside 'port work ...'
>>>> 
>>>> "Brian D. McGrew" <brian at visionpro.com> wrote:
>>>>> On 8/8/13 2:00 PM, "Jeremy Huddleston Sequoia" <jeremyhu at macports.org>
>>>>> wrote:
>>>>> 
>>>>> 
>>>>>> 
>>>>>> On Aug 8, 2013, at 13:53, Jeremy Huddleston Sequoia
>>>>>> <jeremyhu at macports.org> wrote:
>>>>>> 
>>>>>>> 
>>>>>>> On Aug 8, 2013, at 12:58, David Barto <DBarto at visionpro.com> wrote:
>>>>>>> 
>>>>>>>> It appears that the following is missing from the configuration for
>>>>>>>> libstdc++.
>>>>>>>> 
>>>>>>>> --enable-libstdcxx-threads
>>>>>>>> Enable C++11 threads support. If not explicitly specified, the
>>>>>>>> configure process enables it if possible. It defaults to 'off' on
>>>>>>>> Solaris 9, where it would break symbol versioning. This option can
>>>>>>>> change the library ABI.
>>>>>>>> 
>>>>>>>> Yes, it changes the ABI, however for std::call_once to work, I
>>>>> think
>>>>>>>> it is required. I don't think that the configuration process is
>>>>> setting
>>>>>>>> it by default.
>>>>>>> 
>>>>>>> What makes you say that?  It looks like it is to me:
>>>>>> 
>>>>>> ...
>>>>>> 
>>>>>>> Is your _GLIBCXX_HAS_GTHREADS undefined for some reason?  That
>>>>> doesn't
>>>>>>> make sense...
>>>>>> 
>>>>>> 
>>>>>> Yeah, it looks fine to me:
>>>>>> 
>>>>>> libstdc++-v3/config.log:#define _GLIBCXX_HAS_GTHREADS 1
>>>>>> 
>>>>> 
>>>>> Where is the config.log?  Over in
>>>>> /opt/local/var/macports/software/libstdc++ all I find is a tar ball of
>>>>> the
>>>>> library???
>>>>> 
>>>>> 
>>>>> 
>>>>> _______________________________________________
>>>>> macports-users mailing list
>>>>> macports-users at lists.macosforge.org
>>>>> https://lists.macosforge.org/mailman/listinfo/macports-users
>>>> 
>>> 
>> 
> 
> <threading.cpp>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4145 bytes
Desc: not available
URL: <http://lists.macosforge.org/pipermail/macports-users/attachments/20130808/b05011c7/attachment.p7s>


More information about the macports-users mailing list