Re: libc++ vs. libstdc++ usage in the ports tree

From: Jan Henrik Sylvester <me_at_janh.de>
Date: Wed, 04 Dec 2013 02:23:39 +0100
On 12/04/2013 00:23, Tijl Coosemans wrote:
> On Tue, 03 Dec 2013 22:37:34 +0100 Jan Henrik Sylvester wrote:
>> On 12/03/2013 21:54, Tijl Coosemans wrote:
>>> On Tue, 03 Dec 2013 21:26:18 +0100 Jan Henrik Sylvester wrote:
>>>> On 12/01/2013 15:06, Tijl Coosemans wrote:
>>>>> The tests were successful:
>>>>> https://redports.org/buildarchive/20131201105316-94935/ (octave)
>>>>> https://redports.org/buildarchive/20131201115701-22333/ (octave-forge-base)
>>>>> The octave logs also contain the results of running the regression-test
>>>>> target.  The output is the same on all FreeBSD versions.
>>>>>
>>>>> The problem is that USE_FORTRAN=yes implies USE_GCC=yes.  This means
>>>>> the C++ code in math/octave is compiled with gcc46/libstdc++ which
>>>>> does not work if dependencies have been built with clang/libc++.
>>>>>
>>>>> The patch copies the USE_FORTRAN=yes logic from Mk/bsd.gcc.mk into a
>>>>> new file Mk/Uses/fortran.mk.  It allows ports to use a Fortran compiler
>>>>> together with the base system C/C++ compiler.
>>>>
>>>> With the patch, math/octave fails for me on 9.2-RELEASE/amd64 and
>>>> 10.0-BETA4/amd64 with:
>>>>
>>>> checking for amd64-portbld-freebsd(9.2|10.0)-gfortran... f77
>>>> checking whether we are using the GNU Fortran 77 compiler... no
>>>> checking whether f77 accepts -g... no
>>>> checking how to get verbose linking output from f77... configure:
>>>> WARNING: compilation failed
>>>>
>>>> checking for Fortran 77 libraries of f77...
>>>> checking for dummy main to link with Fortran 77 libraries... none
>>>> checking for Fortran 77 name-mangling scheme... configure: error: in
>>>> `/usr/ports/math/octave/work/octave-3.6.4':
>>>> configure: error: cannot compile a simple Fortran program
>>>>
>>>> Full logs attached (each with and without your patch).
>>>>
>>>> In both cases, it tries to use f77, while the original port uses gfortran46.
>>>>
>>>> Any idea what is wrong on my system?
>>>
>>> Do you define FC in make.conf maybe?
>>
>> No, besides some options (*_SET / *_UNSET) for some unrelated ports, I
>> only have got this in make.conf:
> 
> Hmm, apparently FC is defined by sys.mk.  I've attached a new patch.

Ok, with the new patch, it compiles and packages on 9.2-RELEASE/amd64
and 10.0-BETA4/amd64. From the new packages, the octave binaries were
able to do some simple math.

Thanks,
Jan Henrik
Received on Wed Dec 04 2013 - 00:23:46 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:45 UTC