[Nix-dev] Conflict between gfortran and gcc

Tom Short tshort.rlists at gmail.com
Mon Dec 23 18:25:23 CET 2013


Newbie here...

I'm trying to package a program that uses both gfortran and g++.
My problem is that the Makefile sometimes uses gcc to compile C++
code. On most systems, that works fine. With nix, gcc seems to
point to a version in gfortran and not a version in the gcc
package. With that, compiling fails with a note saying that C++
support isn't included. Linking fails because a C++ library isn't
found.

In a default.nix file, is there a way I can make gcc point to the
binary in the gcc package rather than the one in the gfortran
package?

I can try to patch up Makefiles to use g++ rather than gcc, but it'd
be easier to point to the right version of gcc.


More information about the nix-dev mailing list