lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi] MinGW-w64 gcc-6.3.0 anomaly


From: Greg Chicares
Subject: [lmi] MinGW-w64 gcc-6.3.0 anomaly
Date: Sun, 20 Aug 2017 17:58:45 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1

For the native builds distributed by MinGW-w64, invoking the
compiler with a fully-qualified path no longer works with
gcc-6.3.0:

/tmp[0]$cat hello.cpp
#include <iostream>
#include <ostream>

int main()
{
    std::cout << "Hello" << std::endl;
}

/tmp[0]$PATH="/opt/lmi/local/bin:/opt/lmi/local/lib:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin"
 /MinGW_/bin/g++ -c hello.cpp
/tmp[1]$ls hello*
hello.c  hello.cpp

The compiler simply fails, returning "1" with no diagnostic.
It succeeds only if the compiler's binary path is on $PATH:

/tmp[0]$PATH="/opt/lmi/local/bin:/opt/lmi/local/lib:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/MinGW_/bin"
 /MinGW_/bin/g++ -c hello.cpp
/tmp[0]$ls hello*
hello.c  hello.cpp  hello.o

This is of course regrettable: it makes it unreasonably
difficult to use other compilers that might also provide
binaries with names like 'cpp.exe'.

I'll push experimental
  commit ffcea7f91b1af2fcb5514eba4870085273fe162c
and test it in a VM.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]