library not found for -lgfortran

Mark Brethen mark.brethen at gmail.com
Wed Jul 9 18:21:32 PDT 2014


On Jul 9, 2014, at 7:46 PM, Ryan Schmidt <ryandesign at macports.org> wrote:

> 
> On Jul 9, 2014, at 7:42 PM, Mark Brethen wrote:
> 
>> On Jul 8, 2014, at 7:46 PM, Sean Farley wrote:
>> 
>>> Try setting 'configure.ld ${configure.fc}' in the pre-configure stage
>>> and see if that works. It might not but is worth a shot.
>> 
>> exec gfortran-mp-4.8 --print-file-name libgfortran.dylib
>> /opt/local/lib/gcc48/gcc/x86_64-apple-darwin13/4.8.2/../../../libgfortran.dylib
>> 
>> Then, would this be an acceptable workaround?
>> 
>> pre-configure {
>> libgfortran = [exec gfortran-mp-4.8 --print-file-name libgfortran.a]
>> configure.ldflags-append "-L${file dirname libgfortran} -lgfortran"
>> }
> 
> The correct Tcl syntax would be:
> 
> pre-configure {
>    set libgfortran [exec ${configure.fc} --print-file-name libgfortran.a]
>    configure.ldflags-append "-L[file dirname ${libgfortran}]"
> }
> 
> I removed "-lgfortran", assuming the build system already does that. If it does not, then it would be simpler to just pass the complete path to the library, rather than passing a -L flag to its directory and a -l path to its name.
> 
>> Is there is a variable that expands to the fortran compiler?
> 
> configure.fc
> 

That worked. 

Now the only build issue (I hope) is that pyport tries to replace the ctypes definion of the isascii(ch) resulting in:

XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/__locale:436:15: error: C++ requires a type specifier for all declarations
:info:build     char_type toupper(char_type __c) const
:info:build               ^~~~~~~~~~~~~~~~~~~~~~
:info:build /opt/local/Library/Frameworks/Python.framework/Versions/2.7/Headers/pyport.h:731:29: note: expanded from macro 'toupper'
:info:build #define toupper(c) towupper(btowc(c))

I submitted a ticket (#44288) and patch from the python bug tracker.


Mark






More information about the macports-dev mailing list