Modify

Opened 7 years ago

Closed 7 years ago

Last modified 4 years ago

#7863 closed defect (fixed)

uci build error on trunk ar71xx

Reported by: zukky@… Owned by: nbd
Priority: normal Milestone: Barrier Breaker 14.07
Component: packages Version: Trunk
Keywords: uci Cc:

Description

Hi.

uci fails to build on trunk ar71xx. I confirmed it in r22877.

make -C /home/owrt/openwrt/trunk/build_dir/target-mips_r2_uClibc-0.9.30.1/uci-12012009.6 AR=mips-openwrt-linux-uclibc-ar AS="mips-openwrt-linux-uclibc-gcc -c -Os -pipe -mips32r2 -mtune=mips32r2 -funit-at-a-time -fhonour-copts -msoft-float" LD=mips-openwrt-linux-uclibc-ld NM=mips-openwrt-linux-uclibc-nm CC="mips-openwrt-linux-uclibc-gcc" GCC="mips-openwrt-linux-uclibc-gcc" CXX="mips-openwrt-linux-uclibc-g++" RANLIB=mips-openwrt-linux-uclibc-ranlib STRIP=mips-openwrt-linux-uclibc-strip OBJCOPY=mips-openwrt-linux-uclibc-objcopy OBJDUMP=mips-openwrt-linux-uclibc-objdump SIZE=mips-openwrt-linux-uclibc-size COPTS="-Os -pipe -mips32r2 -mtune=mips32r2 -funit-at-a-time -fhonour-copts -msoft-float" DEBUG="" VERSION="12012009" CPPFLAGS="-I/home/owrt/openwrt/trunk/build_dir/target-mips_r2_uClibc-0.9.30.1/uci-12012009.6 -I/home/owrt/openwrt/trunk/staging_dir/target-mips_r2_uClibc-0.9.30.1/usr/include -I/home/owrt/openwrt/trunk/staging_dir/target-mips_r2_uClibc-0.9.30.1/include -I/home/owrt/openwrt/trunk/staging_dir/toolchain-mips_r2_gcc-4.3.3+cs_uClibc-0.9.30.1/usr/include -I/home/owrt/openwrt/trunk/staging_dir/toolchain-mips_r2_gcc-4.3.3+cs_uClibc-0.9.30.1/include" FPIC="-fpic" OS="Linux"
make[4]: Entering directory `/home/owrt/openwrt/trunk/build_dir/target-mips_r2_uClibc-0.9.30.1/uci-12012009.6'
mips-openwrt-linux-uclibc-gcc -c -o cli.o -I/home/owrt/openwrt/trunk/build_dir/target-mips_r2_uClibc-0.9.30.1/uci-12012009.6 -I/home/owrt/openwrt/trunk/staging_dir/target-mips_r2_uClibc-0.9.30.1/usr/include -I/home/owrt/openwrt/trunk/staging_dir/target-mips_r2_uClibc-0.9.30.1/include -I/home/owrt/openwrt/trunk/staging_dir/toolchain-mips_r2_gcc-4.3.3+cs_uClibc-0.9.30.1/usr/include -I/home/owrt/openwrt/trunk/staging_dir/toolchain-mips_r2_gcc-4.3.3+cs_uClibc-0.9.30.1/include -Os -pipe -mips32r2 -mtune=mips32r2 -funit-at-a-time -fhonour-copts -msoft-float -pedantic -Werror -Wall -std=gnu99 cli.c
In file included from /home/owrt/openwrt/trunk/staging_dir/toolchain-mips_r2_gcc-4.3.3+cs_uClibc-0.9.30.1/usr/include/strings.h:30,

from cli.c:14:

/home/owrt/openwrt/trunk/staging_dir/toolchain-mips_r2_gcc-4.3.3+cs_uClibc-0.9.30.1/usr/include/features.h:426:38: error: ISO C does not permit named variadic macros
/home/owrt/openwrt/trunk/staging_dir/toolchain-mips_r2_gcc-4.3.3+cs_uClibc-0.9.30.1/usr/include/features.h:429:38: error: ISO C does not permit named variadic macros
make[4]: * [cli.o] Error 1
make[4]: Leaving directory `/home/owrt/openwrt/trunk/build_dir/target-mips_r2_uClibc-0.9.30.1/uci-12012009.6'
make[3]:
* /home/owrt/openwrt/trunk/build_dir/target-mips_r2_uClibc-0.9.30.1/uci-12012009.6/.built Error 2
make[3]: Leaving directory `/home/owrt/openwrt/trunk/package/uci'
make[2]: * [package/uci/compile] Error 2
make[2]: Leaving directory `/home/owrt/openwrt/trunk'
make[1]:
* /home/owrt/openwrt/trunk/staging_dir/target-mips_r2_uClibc-0.9.30.1/stamp/.package_compile Error 2
make[1]: Leaving directory `/home/owrt/openwrt/trunk'
make: * [world] エラー 2

Attachments (0)

Change History (10)

comment:1 Changed 7 years ago by Márton Miklós <martonmiklosqdev@…>

The brcm63xx platform is also affected.
Somewhere I have read that the leaving of the -pedantic option would fix it, but I have no clue where and how could it be done. I have tried to do it in the Makefile, but it cannot be done because this argument is appended from somewhere else globally.

comment:2 Changed 7 years ago by jow

  • Owner changed from developers to nbd
  • Status changed from new to assigned

comment:3 Changed 7 years ago by Michael Evans <mjevans1983@…>

Same issue on the brcm47xx platform

staging_dir/toolchain-mipsel_gcc-4.3.3+cs_uClibc-0.9.30.1/usr/include/features.h

#ifndef libc_hidden_proto
#define libc_hidden_proto(name, attrs...)
#endif
#ifndef libm_hidden_proto
#define libm_hidden_proto(name, attrs...)
#endif
#endif  /* features.h  */

http://gcc.gnu.org/onlinedocs/gcc-4.3.5/cpp/Variadic-Macros.html#Variadic-Macros

Reading this and googling a bit, it seems that the syntax used is the GNU cpp's legacy syntax, while both -pendantic and -std=gnu99 are requested; I presume that this is either a but for not relaxing pendantic to gnu99 OR a legitimate 'non C99' syntax error, since it expects a different format.

Maybe this will work with a more recent version of gcc and/or uClibc?

--2010-10-20 18:40:26--  http://mirror2.openwrt.org/sources/uci-2010-09-28.1.tar.gz
Resolving mirror2.openwrt.org... 88.198.39.176
Connecting to mirror2.openwrt.org|88.198.39.176|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 50434 (49K) [application/x-tar]
Saving to: `STDOUT'

100%[==============================================================================================================================================>] 50,434      55.6K/s   in 0.9s

2010-10-20 18:40:33 (55.6 KB/s) - written to stdout [50434/50434]

. /media/stuff/src/openwrt/dev/trunk/include/shell.sh; . /media/stuff/src/openwrt/dev/trunk/include/shell.sh; gzip -dc /media/stuff/src/openwrt/src//uci-2010-09-28.1.tar.gz | /bin/tar -C /media/stuff/src/openwrt/dev/trunk/build_dir/target-mipsel_uClibc-0.9.30.1/uci-2010-09-28.1/.. -xf -

Applying ./patches/120-uci_trigger.patch using plaintext:
patching file trigger/Makefile
patching file trigger/uci_trigger.c
touch /media/stuff/src/openwrt/dev/trunk/build_dir/target-mipsel_uClibc-0.9.30.1/uci-2010-09-28.1/.prepared_b8c265661d338cd4f777a4d9b77aa0a0
touch /media/stuff/src/openwrt/dev/trunk/build_dir/target-mipsel_uClibc-0.9.30.1/uci-2010-09-28.1/.configured_
make -C /media/stuff/src/openwrt/dev/trunk/build_dir/target-mipsel_uClibc-0.9.30.1/uci-2010-09-28.1 AR=mipsel-openwrt-linux-uclibc-ar AS="mipsel-openwrt-linux-uclibc-gcc -c -Os -pipe -mips32 -mtune=mips32 -funit-at-a-time -fhonour-copts -msoft-float" LD=mipsel-openwrt-linux-uclibc-ld NM=mipsel-openwrt-linux-uclibc-nm CC="mipsel-openwrt-linux-uclibc-gcc" GCC="mipsel-openwrt-linux-uclibc-gcc" CXX="mipsel-openwrt-linux-uclibc-g++" RANLIB=mipsel-openwrt-linux-uclibc-ranlib STRIP=mipsel-openwrt-linux-uclibc-strip OBJCOPY=mipsel-openwrt-linux-uclibc-objcopy OBJDUMP=mipsel-openwrt-linux-uclibc-objdump SIZE=mipsel-openwrt-linux-uclibc-size COPTS="-Os -pipe -mips32 -mtune=mips32 -funit-at-a-time -fhonour-copts -msoft-float" DEBUG="" VERSION="2010-09-28" CPPFLAGS="-I/media/stuff/src/openwrt/dev/trunk/build_dir/target-mipsel_uClibc-0.9.30.1/uci-2010-09-28.1 -I/media/stuff/src/openwrt/dev/trunk/staging_dir/target-mipsel_uClibc-0.9.30.1/usr/include -I/media/stuff/src/openwrt/dev/trunk/staging_dir/target-mipsel_uClibc-0.9.30.1/include -I/media/stuff/src/openwrt/dev/trunk/staging_dir/toolchain-mipsel_gcc-4.3.3+cs_uClibc-0.9.30.1/usr/include -I/media/stuff/src/openwrt/dev/trunk/staging_dir/toolchain-mipsel_gcc-4.3.3+cs_uClibc-0.9.30.1/include" FPIC="-fpic" OS="Linux"
make[4]: Entering directory `/media/stuff/src/openwrt/dev/trunk/build_dir/target-mipsel_uClibc-0.9.30.1/uci-2010-09-28.1'
mipsel-openwrt-linux-uclibc-gcc -c -o cli.o -I/media/stuff/src/openwrt/dev/trunk/build_dir/target-mipsel_uClibc-0.9.30.1/uci-2010-09-28.1 -I/media/stuff/src/openwrt/dev/trunk/staging_dir/target-mipsel_uClibc-0.9.30.1/usr/include -I/media/stuff/src/openwrt/dev/trunk/staging_dir/target-mipsel_uClibc-0.9.30.1/include -I/media/stuff/src/openwrt/dev/trunk/staging_dir/toolchain-mipsel_gcc-4.3.3+cs_uClibc-0.9.30.1/usr/include -I/media/stuff/src/openwrt/dev/trunk/staging_dir/toolchain-mipsel_gcc-4.3.3+cs_uClibc-0.9.30.1/include -Os -pipe -mips32 -mtune=mips32 -funit-at-a-time -fhonour-copts -msoft-float -pedantic -Werror -Wall -std=gnu99 cli.c
In file included from /media/stuff/src/openwrt/dev/trunk/staging_dir/toolchain-mipsel_gcc-4.3.3+cs_uClibc-0.9.30.1/usr/include/strings.h:30,
                 from cli.c:14:
/media/stuff/src/openwrt/dev/trunk/staging_dir/toolchain-mipsel_gcc-4.3.3+cs_uClibc-0.9.30.1/usr/include/features.h:426:38: error: ISO C does not permit named variadic macros
/media/stuff/src/openwrt/dev/trunk/staging_dir/toolchain-mipsel_gcc-4.3.3+cs_uClibc-0.9.30.1/usr/include/features.h:429:38: error: ISO C does not permit named variadic macros
make[4]: *** [cli.o] Error 1
make[4]: Leaving directory `/media/stuff/src/openwrt/dev/trunk/build_dir/target-mipsel_uClibc-0.9.30.1/uci-2010-09-28.1'
make[3]: *** [/media/stuff/src/openwrt/dev/trunk/build_dir/target-mipsel_uClibc-0.9.30.1/uci-2010-09-28.1/.built] Error 2
make[3]: Leaving directory `/media/stuff/src/openwrt/dev/trunk/package/uci'
make[2]: *** [package/uci/compile] Error 2
make[2]: Leaving directory `/media/stuff/src/openwrt/dev/trunk'
make[1]: *** [/media/stuff/src/openwrt/dev/trunk/staging_dir/target-mipsel_uClibc-0.9.30.1/stamp/.package_compile] Error 2
make[1]: Leaving directory `/media/stuff/src/openwrt/dev/trunk'
make: *** [world] Error 2

comment:4 follow-up: Changed 7 years ago by Michael Evans <mjevans1983@…>

{{{gcc 4.1.2
gcc 4.2.4
gcc 4.3.3
gcc 4.3.4
gcc 4.3.5
gcc 4.4.1
gcc 4.4.2
gcc 4.4.3
gcc 4.4.4
gcc 4.4.5
gcc 4.5.0
gcc 4.5.1
gcc 4.3.3 with CodeSourcery enhancements << What was in use
gcc 4.4.1 with CodeSourcery enhancements << Try 2
}}}

uClibc 0.9.30.1 << What was in use
uClibc 0.9.30.2
uClibc 0.9.30.3
uClibc 0.9.31
uClibc 0.9.32 (with nptl support) << Try 2

My second try finally completed successfully, this seems to be a glitch in either GCC or uClibc; someone else who still has the problem can see if changing one and not the other fixes it. I'm happy with both being upgraded.

comment:5 in reply to: ↑ 4 Changed 7 years ago by Michael Evans <mjevans1983@…>

Redoing for a hopelessly picky wiki syntax

gcc 4.1.2
gcc 4.2.4
gcc 4.3.3
gcc 4.3.4
gcc 4.3.5
gcc 4.4.1
gcc 4.4.2
gcc 4.4.3
gcc 4.4.4
gcc 4.4.5
gcc 4.5.0
gcc 4.5.1
gcc 4.3.3 with CodeSourcery enhancements << What was in use
gcc 4.4.1 with CodeSourcery enhancements << Try 2

comment:6 Changed 7 years ago by murlock42@…

With PcEngines Alix target, I've the same error. I've switched to uClibc 0.9.30.2 and the build was ok.

comment:7 Changed 7 years ago by Márton Miklós <martonmiklosqdev@…>

With brcm63xx I have swithced the gcc and the uclibc version to the mentioned version and it works fine.
Thank you for the hint!

comment:8 Changed 7 years ago by Michael Evans <mjevans1983@…>

BTW, it should be obvious, but you may want to...

make clean
rm -r build_dir/*
make

in order to ensure that everything uses the new toolchain and to free the space used by the old one.

comment:9 Changed 7 years ago by nbd

  • Resolution set to fixed
  • Status changed from assigned to closed

comment:10 Changed 4 years ago by jow

  • Milestone changed from Attitude Adjustment 12.09 to Barrier Breaker 14.07

Milestone Attitude Adjustment 12.09 deleted

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.