Error trying to exec cc1d...
Tobias Schlüter
tobias.schlueter@physik.uni-muenchen.de
Sun Aug 26 17:12:00 GMT 2012
Dear Angelo,
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
> (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!
>
> 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.e.
>
> $ gfortran -c foo.d foo.F
> gfortran: warning: foo.d: linker input file unused because linking not done
>
> On these systems I have no D compiler, just like on Kubuntu/Ubuntu!
>
it seems that including the D compiler changes the compiler driver's
behavior. Maybe inevitable, but certainly unfortunate. Now, the rules
of the compiler driver concerning unknown file extensions are:
"""
other
An object file to be fed straight into linking. Any file
name with
no recognized suffix is treated this way.
"""
The specific choice made based on the file extension can usually be
overridden by the -x flag. It has the following documentation
"""
You can specify the input language explicitly with the -x option:
-x language
Specify explicitly the language for the following input files
(rather than letting the compiler choose a default based on the
file name suffix). This option applies to all following input
files until the next -x option. Possible values for
language are:
c c-header c-cpp-output
c++ c++-header c++-cpp-output
objective-c objective-c-header objective-c-cpp-output
objective-c++ objective-c++-header
objective-c++-cpp-output
assembler assembler-with-cpp
ada
f95 f95-cpp-input
java
treelang
-x none
Turn off any specification of a language, so that subsequent
files
are handled according to their file name suffixes (as they
are if
-x has not been used at all).
"""
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).
Best regards,
- Tobi
> ...and it is not all.. Indeed I have just installed, on Kubuntu, gcc-4.8
> nightly builds:
>
> http://gfortran.com/download/x86_64/nightlies/gcc-trunk-20120826-r190682.tar.xz
>
>
> With it I have
>
> $ ./gcc-trunk/bin/gfortran -c foo.d foo.F
> gfortran: warning: foo.d: linker input file unused because linking not done
>
> .i.e., it works as on other systems!!!
>
> For completeness, on Kubuntu the failing gcc-4.6.3 was built with:
>
> $ gfortran -v
> Using built-in specs.
> COLLECT_GCC=gfortran
> COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.6/lto-wrapper
> Target: x86_64-linux-gnu
> Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro
> 4.6.3-1ubuntu5' --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs
> --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr
> --program-suffix=-4.6 --enable-shared --enable-linker-build-id
> --with-system-zlib --libexecdir=/usr/lib --without-included-gettext
> --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.6
> --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu
> --enable-libstdcxx-debug --enable-libstdcxx-time=yes
> --enable-gnu-unique-object --enable-plugin --enable-objc-gc
> --disable-werror --with-arch-32=i686 --with-tune=generic
> --enable-checking=release --build=x86_64-linux-gnu
> --host=x86_64-linux-gnu --target=x86_64-linux-gnu
> Thread model: posix
> gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5)
>
> ...perhaps on Kubuntu it doesn't like some "--enable..."?
>
>
> Ciao,
> Angelo.
>
>
> On Sat, 25 Aug 2012, Andrew Pinski wrote:
>
>> On Sat, Aug 25, 2012 at 1:46 PM, Angelo Graziosi
>> <Angelo.Graziosi@roma1.infn.it> wrote:
>>>
>>> For the sake of completeness I want to flag the following problem found
>>> building some more complex software on GNU Linux Kubuntu 12.04 +
>>> gfortran
>>> 4.6.3.
>>>
>>> I have reduced it to the this simple test case (the tar ball contains
>>> the
>>> needed files):
>>>
>>> $ cat foo.F
>>> subroutine foo(i,lo)
>>> implicit none
>>> integer i
>>> logical lo
>>> call foo_b(i,lo)
>>> end
>>>
>>> $ echo "# DO NOT DELETE THIS LINE - used by make depend" > foo.d
>>>
>>> $ gfortran -c foo.d foo.F
>>> gfortran: error trying to exec 'cc1d': execvp: File o directory does not
>>> exist
>>>
>>> The error occurs only on Kubuntu.
>>
>> Yes cc1d is the D compiler. It looks like you don't have the D
>> compiler installed.
>>
>> Thanks,
>> Andrew
>>
>>
>>>
>>> On Fedora 16 and Mac OS X (+Macports), with the same GCC version, 4.6.3,
>>> there is only a warning (which does not break the build for the true
>>> software):
>>>
>>> $ gfortran -c foo.d foo.F
>>> gfortran: warning: foo.d: linker input file unused because linking
>>> not done
>>>
>>> Any idea about the failure on Kubuntu?
>>>
>>>
>>> Thanks,
>>> Angelo.
>>
>>
More information about the Fortran
mailing list