compile error with gcc 4.3

913 views
Skip to first unread message

Friedemann Bunjes

unread,
Sep 12, 2011, 2:26:22 AM9/12/11
to comed...@googlegroups.com
Dear comedy-list,

i have problems compiling the current comedy version using a current autimake and gcc 4.3:


gcc: 0: No such file or directory
gcc: unrecognized option '-G'

autogen, configure and compile logs: see below.

Thanks in advance for any help!

Best,

Friedemann

--

./autogen.sh
configure.ac:35: installing `./compile'
configure.ac:6: installing `./config.guess'
configure.ac:6: installing `./config.sub'
configure.ac:25: installing `./install-sh'
configure.ac:25: installing `./missing'
comedi/Makefile.am: installing `./depcomp'
Makefile.am:42: `:='-style assignments are not portable
Makefile.am:42: shell find $(srcdir: non-POSIX variable name
Makefile.am:42: (probably a GNU make extension)


comedi-HEAD-6f425c7# ./configure --with-rtaidir=/usr/lib/realtime --with-rtlinuxdir=/usr/local/src/linux-2.6.32.11
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking whether gcc and cc understand -c and -o together... yes
checking for strip... /usr/bin/strip
checking for depmod... /sbin/depmod
configure: Using 2.6.32.11rtai as the uname -r value
configure: Using i686 as the uname -m value
checking for rpm... no
checking for Linux build in /lib/modules/2.6.32.11rtai/build... yes
checking for separate Linux source and build directory... no
checking /lib/modules/2.6.32.11rtai/build/.config... yes
checking Pre-FC2 Red Hat/Fedora kernel... not found
checking Linux config option CONFIG_M386... no
checking Linux config option CONFIG_M586... no
checking Linux config option CONFIG_M686... no
checking Linux config option CONFIG_MPENTIUMIII... no
checking Linux config option CONFIG_MK7... no
checking Linux config option CONFIG_SMP... yes
checking Linux config option CONFIG_HIGHMEM64G... no
configure: Putting kernel modules under /lib/modules/2.6.32.11rtai
configure: Putting kernel module development files under /lib/modules/2.6.32.11rtai/build
checking Linux major/minor version... 2.6
checking for Linux CFLAGS... -DMODULE -mlong-calls
checking for modpost... /lib/modules/2.6.32.11rtai/build/scripts/mod/modpost
checking for strip... (cached) /usr/bin/strip
checking for depmod... (cached) /sbin/depmod
configure: creating modtool
checking Linux config option CONFIG_RTHAL... no
checking Linux config option CONFIG_ADEOS... no
checking Linux config option CONFIG_IPIPE... yes
checking RTAI directory /usr/lib/realtime... found
checking Linux config option CONFIG_RTLINUX... no
checking Linux config option CONFIG_PCI... yes
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking /lib/modules/2.6.32.11rtai/build for probe in pcmcia_driver struct... yes
checking Linux config option CONFIG_PCMCIA... module
checking /lib/modules/2.6.32.11rtai/build for name in pcmcia_driver struct... no
checking /lib/modules/2.6.32.11rtai/build for pcmcia_loop_tuple function... no
checking /lib/modules/2.6.32.11rtai/build for dev_node_t in pcmcia/ds.h (removed in 2.6.35)... yes
checking /lib/modules/2.6.32.11rtai/build for irq_req_t in pcmcia/cs.h (removed in 2.6.35)... yes
checking /lib/modules/2.6.32.11rtai/build for io_req_t in pcmcia/cs.h (removed in 2.6.36)... yes
checking /lib/modules/2.6.32.11rtai/build for memreq_t in pcmcia/cs.h (removed in 2.6.36)... yes
checking /lib/modules/2.6.32.11rtai/build for include/pcmcia/cs_types.h (removed in 2.6.36)... yes
checking /lib/modules/2.6.32.11rtai/build for include/pcmcia/cs.h (removed in 2.6.37)... yes
checking /lib/modules/2.6.32.11rtai/build for 'bool' in include/linux/types.h... yes
checking Linux config option CONFIG_USB... module
checking for Kbuild support in /lib/modules/2.6.32.11rtai/build... yes
checking /lib/modules/2.6.32.11rtai/build for include/linux/mutex.h... yes
checking /lib/modules/2.6.32.11rtai/build for include/linux/semaphore.h... yes
checking Linux config option CONFIG_ISA... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating comedi/Makefile
config.status: creating comedi/comedi_kbuild.inc
config.status: creating comedi/drivers/Makefile
config.status: creating comedi/drivers/addi-data/Makefile
config.status: creating comedi/kcomedilib/Makefile
config.status: creating include/Makefile
config.status: creating include/asm/Makefile
config.status: creating include/linux/Makefile
config.status: creating include/pcmcia/Makefile
config.status: creating config.h
config.status: executing depfiles commands

# make
make all-recursive
make[1]: Entering directory `/usr/local/src/comedi-HEAD-6f425c7'
Making all in comedi
make[2]: Entering directory `/usr/local/src/comedi-HEAD-6f425c7/comedi'
Making all in .
make[3]: Entering directory `/usr/local/src/comedi-HEAD-6f425c7/comedi'
if test "." != "."; then \
for dir in . drivers kcomedilib drivers/addi-data; do \
for file in `ls /usr/local/src/comedi-HEAD-6f425c7/comedi/$dir/*\.[ch] /usr/local/src/comedi-HEAD-6f425c7/comedi/$dir/Kbuild | /bin/grep -E -v \.mod\.c`; do \
LINK_NAME=$dir/`basename "$file"`; \
if test ! -e $LINK_NAME; then ln -vs $file $LINK_NAME; fi; \
done; \
done; \
fi
make -I/usr/local/src/comedi-HEAD-6f425c7/comedi -C /usr/local/src/linux-2.6.32.11 M=/usr/local/src/comedi-HEAD-6f425c7/comedi CC="gcc -I/usr/local/src/comedi-HEAD-6f425c7/ \
-I/usr/local/src/comedi-HEAD-6f425c7/include -I/usr/lib/realtime/include " modules
make[4]: Entering directory `/usr/local/src/linux-2.6.32.11'
CC [M] /usr/local/src/comedi-HEAD-6f425c7/comedi/comedi_fops.o
gcc: 0: No such file or directory
gcc: unrecognized option '-G'
cc1: error: unrecognized command line option "-mno-abicalls"
cc1: error: unrecognized command line option "-mlong-calls"
make[5]: *** [/usr/local/src/comedi-HEAD-6f425c7/comedi/comedi_fops.o] Error 1
make[4]: *** [_module_/usr/local/src/comedi-HEAD-6f425c7/comedi] Error 2
make[4]: Leaving directory `/usr/local/src/linux-2.6.32.11'
make[3]: [all-local] Error 2 (ignored)


--
Dr. rer. nat. Friedemann Bunjes
Hertie-Institut für Klinische Hirnforschung
Zentrum für Neurologie
Universitätsklinikum Tübingen
Otfried-Müller-Str. 27
72076 Tübingen
+49-7071-29-81999

Bernd Porr

unread,
Sep 12, 2011, 3:54:22 AM9/12/11
to comed...@googlegroups.com
Does the error also happen with gcc 4.4? The option exists there.

/Bernd

Friedemann Bunjes wrote:
> Dear comedy-list,
>
> i have problems compiling the current comedy version using a current autimake and gcc 4.3:
>

> �


> gcc: 0: No such file or directory
> gcc: unrecognized option '-G'

> �

--
www: http://www.berndporr.me.uk/
http://www.linux-usb-daq.co.uk/
http://www.imdb.com/name/nm3293421/
Mobile: +44 (0)7840 340069
Work: +44 (0)141 330 5237
University of Glasgow
School of Engineering
72 Oakfield Avenue (Rankine Building for deliveries)
Glasgow, G12 8LT

Friedemann Bunjes

unread,
Sep 12, 2011, 4:52:37 AM9/12/11
to comed...@googlegroups.com
Hi,

yes, same messages after symlinking /usr/bin/gcc-4.4 to /usr/bin/gcc.

Best,

Friedemann

Am 12.09.2011 um 09:54 schrieb Bernd Porr:

> Does the error also happen with gcc 4.4? The option exists there.
>
> /Bernd
>
> Friedemann Bunjes wrote:
>> Dear comedy-list,
>> i have problems compiling the current comedy version using a current autimake and gcc 4.3:

>> …


>> gcc: 0: No such file or directory
>> gcc: unrecognized option '-G'

>> …

> --
> You received this message because you are subscribed to the Google Groups "Comedi: Linux Control and Measurement Device Interface" group.
> To post to this group, send email to comed...@googlegroups.com.
> To unsubscribe from this group, send email to comedi_list...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/comedi_list?hl=en.

Ian Abbott

unread,
Sep 12, 2011, 6:30:48 AM9/12/11
to comed...@googlegroups.com
Hi Friedemann,

There's no need to symlink gcc (and it may screw other things up!). You
can override it by setting LINUX_CC when running 'make', e.g.:

make LINUX_CC=gcc-4.4

Whatever you do, the comedi modules (and rtai modules) need to be built
with a similar version of gcc as the kernel so the first two components
of the version number (major and minor version) have to match. E.g. if
the kernel was built with gcc 4.3.2, the modules can be built with 4.3.4
(matches 4.3) but not with 4.4.0 (does not match 4.3).

You can find out which version of gcc the kernel was built with with

cat /proc/version

Note that the usual method of overriding the CC version when invoking
configure (e.g.: CC=gcc-4.4 ./configure) is ineffective because the
comedi configure script effectively asks the kernel Makefile what
compiler to use and sticks it in LINUX_CC.

I think it would be better if the comedi configure script had an option
to configure LINUX_CC manually, overriding the auto-detected value.
Then you could specify it once at configure time and wouldn't need to
specify it on the make command-line every time. I'll have a look into that.

In the meantime, check /proc/version to find out which compiler to use,
and set LINUX_CC=(something) when you run 'make' as shown above.

Best regards,
Ian.


--
-=( Ian Abbott @ MEV Ltd. E-mail: <abb...@mev.co.uk> )=-
-=( Tel: +44 (0)161 477 1898 FAX: +44 (0)161 718 3587 )=-

Friedemann Bunjes

unread,
Sep 12, 2011, 2:00:34 PM9/12/11
to comed...@googlegroups.com
Hi Ian,

thank you very much for the hints.
Weird: Although considering the approach you suggest, the problem persists:

> There's no need to symlink gcc (and it may screw other things up!). You
> can override it by setting LINUX_CC when running 'make', e.g.:
>
> make LINUX_CC=gcc-4.4
>

> You can find out which version of gcc the kernel was built with with
>
> cat /proc/version
>

> In the meantime, check /proc/version to find out which compiler to use,
> and set LINUX_CC=(something) when you run 'make' as shown above.

/usr/local/src/comedi-HEAD-6f425c7# cat /proc/version
Linux version 2.6.32.11rtai (root@nrec) (gcc version 4.3.5 (Debian
4.3.5-4) ) #1 SMP PREEMPT Sun Sep 11 22:36:53 CEST 2011
/usr/local/src/comedi-HEAD-6f425c7# make LINUX_CC=gcc-4.3


make all-recursive
make[1]: Entering directory `/usr/local/src/comedi-HEAD-6f425c7'
Making all in comedi
make[2]: Entering directory `/usr/local/src/comedi-HEAD-6f425c7/comedi'
Making all in .
make[3]: Entering directory `/usr/local/src/comedi-HEAD-6f425c7/comedi'
if test "." != "."; then \
for dir in . drivers kcomedilib drivers/addi-data; do \
for file in `ls
/usr/local/src/comedi-HEAD-6f425c7/comedi/$dir/*\.[ch]
/usr/local/src/comedi-HEAD-6f425c7/comedi/$dir/Kbuild | /bin/grep -E
-v \.mod\.c`; do \
LINK_NAME=$dir/`basename "$file"`; \
if test ! -e $LINK_NAME; then ln -vs
$file $LINK_NAME; fi; \
done; \
done; \
fi
make -I/usr/local/src/comedi-HEAD-6f425c7/comedi -C
/usr/local/src/linux-2.6.32.11

M=/usr/local/src/comedi-HEAD-6f425c7/comedi CC="gcc-4.3

-I/usr/local/src/comedi-HEAD-6f425c7/ \
-I/usr/local/src/comedi-HEAD-6f425c7/include
-I/usr/lib/realtime/include " modules
make[4]: Entering directory `/usr/local/src/linux-2.6.32.11'
CC [M] /usr/local/src/comedi-HEAD-6f425c7/comedi/comedi_fops.o

gcc-4.3: 0: No such file or directory
gcc-4.3: unrecognized option '-G'


cc1: error: unrecognized command line option "-mno-abicalls"
cc1: error: unrecognized command line option "-mlong-calls"

Best,

Friedemann

Ian Abbott

unread,
Sep 13, 2011, 6:32:20 AM9/13/11
to comed...@googlegroups.com
On 2011-09-12 19:00, Friedemann Bunjes wrote:
> Hi Ian,
>
> thank you very much for the hints.
> Weird: Although considering the approach you suggest, the problem persists:

> make[4]: Entering directory `/usr/local/src/linux-2.6.32.11'


> CC [M] /usr/local/src/comedi-HEAD-6f425c7/comedi/comedi_fops.o
> gcc-4.3: 0: No such file or directory
> gcc-4.3: unrecognized option '-G'
> cc1: error: unrecognized command line option "-mno-abicalls"
> cc1: error: unrecognized command line option "-mlong-calls"

The other thing to consider is that the compiler flags aren't set by
comedi, they are set by the kernel, and different architectures use
different flags. Strangely, the only architecture I can see in the
kernel that uses that combination of CFLAGS is the MIPS architecture!
If you're picking up flags from the kernel's arch/mips/Makefile, there
must be something strange about your kernel .config!

Reply all
Reply to author
Forward
0 new messages