Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 547662 - dev-util/cmocka-0.4.1 fails to build with gcc-5.1, patch included
Summary: dev-util/cmocka-0.4.1 fails to build with gcc-5.1, patch included
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] GCC Porting (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Chris Reffett (RETIRED)
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks: gcc-5
  Show dependency tree
 
Reported: 2015-04-25 08:24 UTC by Robert Sebastian Gerus
Modified: 2015-05-30 21:00 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
cmocka-0.4.1-gcc5.patch (cmocka-0.4.1-gcc5.patch,563 bytes, patch)
2015-04-25 08:24 UTC, Robert Sebastian Gerus
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Sebastian Gerus 2015-04-25 08:24:14 UTC
dev-util/cmocka-0.4.1 fails to build with gcc-5.1.

Reproducible: Always

Steps to Reproduce:
1. emerge -v dev-util/cmocka

Actual Results:  
[ 50%] Building C object example/CMakeFiles/calculator_test.dir/calculator_test.c.o
cd /var/tmp/portage/dev-util/cmocka-0.4.1/work/cmocka-0.4.1-abi_x86_32.x86/example && /usr/bin/x86_64-pc-linux-gnu-gcc -m32   -DNDEBUG -Os -mtune=generic -pipe  -std=gnu99 -pedantic -pedantic-errors -Wall -Wextra -Wshadow -Wmissing-prototy
pes -Wdeclaration-after-statement -Wunused -Wfloat-equal -Wpointer-arith -Wwrite-strings -Wformat-security -Wmissing-format-attribute -Wundef -fPIC -fstack-protector -D_GNU_SOURCE -I/var/tmp/portage/dev-util/cmocka-0.4.1/work/cmocka-0.4.1-
abi_x86_32.x86/example -I/var/tmp/portage/dev-util/cmocka-0.4.1/work/cmocka-0.4.1/example -I/var/tmp/portage/dev-util/cmocka-0.4.1/work/cmocka-0.4.1-abi_x86_32.x86 -I/var/tmp/portage/dev-util/cmocka-0.4.1/work/cmocka-0.4.1/include    -o CM
akeFiles/calculator_test.dir/calculator_test.c.o -c /var/tmp/portage/dev-util/cmocka-0.4.1/work/cmocka-0.4.1/example/calculator_test.c
In file included from /var/tmp/portage/dev-util/cmocka-0.4.1/work/cmocka-0.4.1/example/calculator_test.c:19:0:
/var/tmp/portage/dev-util/cmocka-0.4.1/work/cmocka-0.4.1/example/calculator_test.c: In function ‘example_test_fprintf’:
/var/tmp/portage/dev-util/cmocka-0.4.1/work/cmocka-0.4.1/include/cmocka.h:52:18: error: ISO C does not support ‘__FUNCTION__’ predefined identifier [-Wpedantic]
 #define __func__ __FUNCTION__
                  ^
/var/tmp/portage/dev-util/cmocka-0.4.1/work/cmocka-0.4.1/include/cmocka.h:935:21: note: in expansion of macro ‘__func__’
     _check_expected(__func__, #parameter, __FILE__, __LINE__, \
                     ^
/var/tmp/portage/dev-util/cmocka-0.4.1/work/cmocka-0.4.1/example/calculator_test.c:71:2: note: in expansion of macro ‘check_expected’
  check_expected(temporary_buffer);
  ^
/var/tmp/portage/dev-util/cmocka-0.4.1/work/cmocka-0.4.1/example/calculator_test.c: In function ‘example_test_printf’:
/var/tmp/portage/dev-util/cmocka-0.4.1/work/cmocka-0.4.1/include/cmocka.h:52:18: error: ISO C does not support ‘__FUNCTION__’ predefined identifier [-Wpedantic]
 #define __func__ __FUNCTION__
                  ^
/var/tmp/portage/dev-util/cmocka-0.4.1/work/cmocka-0.4.1/include/cmocka.h:935:21: note: in expansion of macro ‘__func__’
     _check_expected(__func__, #parameter, __FILE__, __LINE__, \
                     ^
/var/tmp/portage/dev-util/cmocka-0.4.1/work/cmocka-0.4.1/example/calculator_test.c:84:2: note: in expansion of macro ‘check_expected’
  check_expected(temporary_buffer);
  ^
/var/tmp/portage/dev-util/cmocka-0.4.1/work/cmocka-0.4.1/example/calculator_test.c: In function ‘binary_operator’:
/var/tmp/portage/dev-util/cmocka-0.4.1/work/cmocka-0.4.1/include/cmocka.h:52:18: error: ISO C does not support ‘__FUNCTION__’ predefined identifier [-Wpedantic]
 #define __func__ __FUNCTION__
                  ^
/var/tmp/portage/dev-util/cmocka-0.4.1/work/cmocka-0.4.1/include/cmocka.h:935:21: note: in expansion of macro ‘__func__’
     _check_expected(__func__, #parameter, __FILE__, __LINE__, \
                     ^
/var/tmp/portage/dev-util/cmocka-0.4.1/work/cmocka-0.4.1/example/calculator_test.c:91:2: note: in expansion of macro ‘check_expected’
  check_expected(a);
  ^
/var/tmp/portage/dev-util/cmocka-0.4.1/work/cmocka-0.4.1/include/cmocka.h:52:18: error: ISO C does not support ‘__FUNCTION__’ predefined identifier [-Wpedantic]
 #define __func__ __FUNCTION__
                  ^
/var/tmp/portage/dev-util/cmocka-0.4.1/work/cmocka-0.4.1/include/cmocka.h:935:21: note: in expansion of macro ‘__func__’
     _check_expected(__func__, #parameter, __FILE__, __LINE__, \
                     ^
/var/tmp/portage/dev-util/cmocka-0.4.1/work/cmocka-0.4.1/example/calculator_test.c:92:2: note: in expansion of macro ‘check_expected’
  check_expected(b);
  ^
/var/tmp/portage/dev-util/cmocka-0.4.1/work/cmocka-0.4.1/include/cmocka.h:52:18: error: ISO C does not support ‘__FUNCTION__’ predefined identifier [-Wpedantic]
 #define __func__ __FUNCTION__
                  ^
/var/tmp/portage/dev-util/cmocka-0.4.1/work/cmocka-0.4.1/include/cmocka.h:187:22: note: in expansion of macro ‘__func__’
 #define mock() _mock(__func__, __FILE__, __LINE__)
                      ^
/var/tmp/portage/dev-util/cmocka-0.4.1/work/cmocka-0.4.1/example/calculator_test.c:93:14: note: in expansion of macro ‘mock’
  return (int)mock();
              ^
example/CMakeFiles/calculator_test.dir/build.make:77: recipe for target 'example/CMakeFiles/calculator_test.dir/calculator_test.c.o' failed
make[2]: *** [example/CMakeFiles/calculator_test.dir/calculator_test.c.o] Error 1
make[2]: Leaving directory '/var/tmp/portage/dev-util/cmocka-0.4.1/work/cmocka-0.4.1-abi_x86_32.x86'
CMakeFiles/Makefile2:276: recipe for target 'example/CMakeFiles/calculator_test.dir/all' failed
make[1]: *** [example/CMakeFiles/calculator_test.dir/all] Error 2
make[1]: Leaving directory '/var/tmp/portage/dev-util/cmocka-0.4.1/work/cmocka-0.4.1-abi_x86_32.x86'
Makefile:136: recipe for target 'all' failed
make: *** [all] Error 2


Expected Results:  
>>> dev-util/cmocka-0.4.1 merged.


https://gcc.gnu.org/gcc-5/porting_to.html says it's a new warning, but the software is built with -pedantic -pedantic-errors -Wall -Wextra
Comment 1 Robert Sebastian Gerus 2015-04-25 08:24:47 UTC
Created attachment 401976 [details, diff]
cmocka-0.4.1-gcc5.patch
Comment 2 Michael Palimaka (kensington) gentoo-dev 2015-04-27 15:15:49 UTC
Would be nice to go upstream too.
Comment 3 Johannes Huber (RETIRED) gentoo-dev 2015-05-30 21:00:31 UTC
+
+  30 May 2015; Johannes Huber <johu@gentoo.org> +cmocka-1.0.1.ebuild:
+  Version bump, bug #550496. Fixes build with gcc-5.1, bug #547662.
+