[Nix-dev] gfortran and does not know the path to the glibc.

Eelco Dolstra e.dolstra at tudelft.nl
Fri Sep 5 11:09:57 CEST 2008


Nicolas Pierron wrote:

> Apparently the gfortan compiler does not know the path to the glibc, I
> have tried to set LD_LIBRARY_PATH and LD_RUN_PATH without success.  As
> display with the '-v' option the gcc compiler does know this path and
> correctly link to the glibc for files like crt1.o.
> 
> Does anyone have an idea to solve this problem ?
> 
> I have tried to recompile gfortran with "langC = true" without success.
> 
> $ cat hw.f90
> 
> program HelloWorld
>   write(*,*) "Hello World"
> end program HelloWorld
> 
> $ gfortran -c hw.f90

You have to use the gcc-wrapper, which adds the appropriate flags
("-B$libc/lib", "-dynamic-linker" etc.).

However, I see that the gcc-wrapper only creates wrappers for g77 and f77, not
gfortran.  So I guess it has to be updated (build-support/gcc-wrapper-new is a
good place).

-- 
Eelco Dolstra | http://www.st.ewi.tudelft.nl/~dolstra/



More information about the nix-dev mailing list