Error trying to exec cc1d...
Tobias Burnus
burnus@net-b.de
Sun Aug 26 17:50:00 GMT 2012
Tobias Schlüter wrote:
>
> On 2012-08-26 18:43, Angelo Graziosi wrote:
>>
>> Hmm... I think it is a problem with GCC-4.6.3 on Kubuntu 12.04...
>>
>> In this context, the .d files, like foo.d, are not source of D language
>> but "dictionary" files generated in true software by other applications
Well, how should the pure compiler know which language a file is. GCC -
or to be more precise its compiler drivers ("gcc", "g++", "gfortran") -
support
gfortran foo.c bar.f90
which invokes the C compiler ("cc1") for foo.c and the Fortran compiler
for "bar.f90" ("f951") - and then links the result. Which languages are
supported is determined when GCC itself is compiled.
>> (I don't know D but try cat foo.d...). Only on Kubuntu/Ubuntu (now I
>> have verified also on Ubuntu 12.04...) with gcc-4.6.3 it is thinking
>> that foo.d is a D source file!
Well, the programming language D is (by its inventors) regarded as
successor of C. While you know that .d is not a D file, the compiler
cannot - it either has to regard it as D or regard it as unknown format.
What it does, depends on how GCC was configured (--enable-languages=...).
Note that the D compiler is not yet part of the official GCC
distribution, though there are plans to include it for 4.8.
>>
>> On: Cygwin (gcc-4.5), Fedora 16 (gcc-4.6.3), Mac OS X (Macports
>> gcc-4.6.3) there is ONLY a warning (btw, I have verified it occurs since
>> Nov. 2010! and the built software has worked fine on different systems),
I assume that some Debian/Ubuntu user has asked for the inclusion of D.
After the gdc will be part of GCC, I think other distributions will
follow suite.
By the way, the .mod files which most Fortran compilers generate also
clash with Modula. If you use "make" you might run into this issue when
the compiler all of the sudden tries to invoke the (probably
nonexisting) Modula compiler.
> So there's no gcc-internal way to do what you want: tell the compiler
> to assume that a file ending in ".d" should be passed to the linker.
> You seem to have two choices: renaming the file, changing its
> extension to, say, ".dd". Alternatively, you can write "-Wl,foo.d"
> (not tested).
I would suggest to rename the file to ".o" which is the common extension
of some object, which is passed to the linker. I also made a quick test
with "-Wl," and, unsurprisingly, it seems to work.
Tobias
More information about the Fortran
mailing list