| View previous topic :: View next topic |
| Author |
Message |
as.gentoo Guru


Joined: 07 Aug 2004 Posts: 319
|
Posted: Fri Oct 28, 2016 12:30 pm Post subject: media-libs/jasper-1.900.15 fails to build |
|
|
Hello,
I have problems to emerge media-libs/jasper-1.900.15 . Version 1.900.6 compiled w/o errors.
Is this a problem of my gcc version?
Here is a part of the "error" output in the logfile/screen. | Code: | libtool: compile: x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I/mnt/ramdisk/portage/media-libs/jasper-1.900.15/work/jasper-1.900.15/src/libjasper/base -I../../../src/libjasper/include/jasper -I../../../src/libjasper/include -I/mnt/ramdisk/portage/media-libs/jasper-1.900.15/work/jasper-1.900.15/src/libjasper/include -march=native -O2 -pipe -pedantic -pedantic-errors -Wall -Wno-unused -c /mnt/ramdisk/portage/media-libs/jasper-1.900.15/work/jasper-1.900.15/src/libjasper/base/jas_getopt.c -fPIC -DPIC -o .libs/jas_getopt.o
libtool: compile: x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I/mnt/ramdisk/portage/media-libs/jasper-1.900.15/work/jasper-1.900.15/src/libjasper/base -I../../../src/libjasper/include/jasper -I../../../src/libjasper/include -I/mnt/ramdisk/portage/media-libs/jasper-1.900.15/work/jasper-1.900.15/src/libjasper/include -march=native -O2 -pipe -pedantic -pedantic-errors -Wall -Wno-unused -c /mnt/ramdisk/portage/media-libs/jasper-1.900.15/work/jasper-1.900.15/src/libjasper/base/jas_debug.c -fPIC -DPIC -o .libs/jas_debug.o
In file included from /mnt/ramdisk/portage/media-libs/jasper-1.900.15/work/jasper-1.900.15/src/libjasper/base/jas_image.c:82:0:
/mnt/ramdisk/portage/media-libs/jasper-1.900.15/work/jasper-1.900.15/src/libjasper/include/jasper/jas_math.h: In function ‘jas_int_asr’:
/mnt/ramdisk/portage/media-libs/jasper-1.900.15/work/jasper-1.900.15/src/libjasper/include/jasper/jas_math.h:123:2: error: C++ style comments are not allowed in ISO C90
// The behavior is undefined when x is negative. */
^
/mnt/ramdisk/portage/media-libs/jasper-1.900.15/work/jasper-1.900.15/src/libjasper/include/jasper/jas_math.h:123:2: error: (this will be reported only once per input file)
In file included from /mnt/ramdisk/portage/media-libs/jasper-1.900.15/work/jasper-1.900.15/src/libjasper/base/jas_image.c:83:0:
/mnt/ramdisk/portage/media-libs/jasper-1.900.15/work/jasper-1.900.15/src/libjasper/include/jasper/jas_image.h: At top level:
/mnt/ramdisk/portage/media-libs/jasper-1.900.15/work/jasper-1.900.15/src/libjasper/include/jasper/jas_image.h:403:1: error: C++ style comments are not allowed in ISO C90
// Test if all components are specified at the same positions in space. */
^
/mnt/ramdisk/portage/media-libs/jasper-1.900.15/work/jasper-1.900.15/src/libjasper/include/jasper/jas_image.h:403:1: error: (this will be reported only once per input file)
/mnt/ramdisk/portage/media-libs/jasper-1.900.15/work/jasper-1.900.15/src/libjasper/base/jas_image.c: In function ‘jas_image_cmpt_create’:
/mnt/ramdisk/portage/media-libs/jasper-1.900.15/work/jasper-1.900.15/src/libjasper/base/jas_image.c:333:2: error: C++ style comments are not allowed in ISO C90
// Compute the number of samples in the image component, while protecting
^
/mnt/ramdisk/portage/media-libs/jasper-1.900.15/work/jasper-1.900.15/src/libjasper/base/jas_image.c:333:2: error: (this will be reported only once per input file)
In file included from /mnt/ramdisk/portage/media-libs/jasper-1.900.15/work/jasper-1.900.15/src/libjasper/base/jas_cm.c:77:0:
/mnt/ramdisk/portage/media-libs/jasper-1.900.15/work/jasper-1.900.15/src/libjasper/include/jasper/jas_math.h: In function ‘jas_int_asr’:
/mnt/ramdisk/portage/media-libs/jasper-1.900.15/work/jasper-1.900.15/src/libjasper/include/jasper/jas_math.h:123:2: error: C++ style comments are not allowed in ISO C90
// The behavior is undefined when x is negative. */
^
/mnt/ramdisk/portage/media-libs/jasper-1.900.15/work/jasper-1.900.15/src/libjasper/include/jasper/jas_math.h:123:2: error: (this will be reported only once per input file)
/mnt/ramdisk/portage/media-libs/jasper-1.900.15/work/jasper-1.900.15/src/libjasper/base/jas_debug.c: In function ‘jas_memdump’:
/mnt/ramdisk/portage/media-libs/jasper-1.900.15/work/jasper-1.900.15/src/libjasper/base/jas_debug.c:128:3: warning: ISO C90 does not support the ‘z’ gnu_printf length modifier [-Wformat=]
fprintf(out, "%04zx:", i);
^
In file included from /mnt/ramdisk/portage/media-libs/jasper-1.900.15/work/jasper-1.900.15/src/libjasper/base/jas_getopt.c:78:0:
/mnt/ramdisk/portage/media-libs/jasper-1.900.15/work/jasper-1.900.15/src/libjasper/include/jasper/jas_math.h: In function ‘jas_int_asr’:
/mnt/ramdisk/portage/media-libs/jasper-1.900.15/work/jasper-1.900.15/src/libjasper/include/jasper/jas_math.h:123:2: error: C++ style comments are not allowed in ISO C90
// The behavior is undefined when x is negative. */
^
/mnt/ramdisk/portage/media-libs/jasper-1.900.15/work/jasper-1.900.15/src/libjasper/include/jasper/jas_math.h:123:2: error: (this will be reported only once per input file)
In file included from /mnt/ramdisk/portage/media-libs/jasper-1.900.15/work/jasper-1.900.15/src/libjasper/base/jas_icc.c:64:0:
../../../src/libjasper/include/jasper/jas_config.h:164:33: error: ISO C90 does not support ‘long long’ [-Wlong-long]
#define ulonglong unsigned long long
^
/mnt/ramdisk/portage/media-libs/jasper-1.900.15/work/jasper-1.900.15/src/libjasper/base/jas_icc.c:85:52: note: in expansion of macro ‘ulonglong’
static int jas_iccgetuint(jas_stream_t *in, int n, ulonglong *val);
^
[…]
make[3]: *** [Makefile:481: jas_icc.lo] Error 1
make[3]: Leaving directory '/mnt/ramdisk/portage/media-libs/jasper-1.900.15/work/jasper-1.900.15-abi_x86_64.amd64/src/libjasper/base' | emerge --info
| Code: | Portage 2.3.2 (python 2.7.12-final-0, default/linux/amd64/13.0/desktop/plasma, gcc-4.9.3, glibc-2.23-r2, 4.8.2-gentoo_M16 x86_64)
=================================================================
System uname: Linux-4.8.2-gentoo_M16-x86_64-Intel-R-_Core-TM-_i7_CPU_870_@_2.93GHz-with-gentoo-2.3
KiB Mem: 12295224 total, 1217260 free
KiB Swap: 16777212 total, 16537532 free
Timestamp of repository gentoo: Fri, 28 Oct 2016 10:00:01 +0000
sh bash 4.4-r1
ld GNU ld (Gentoo 2.26.1 p1.0) 2.26.1
app-shells/bash: 4.4-r1::gentoo
dev-lang/perl: 5.24.0-r2::gentoo
dev-lang/python: 2.7.12::gentoo, 3.4.5::gentoo
dev-util/cmake: 3.6.2::gentoo
dev-util/pkgconfig: 0.29.1::gentoo
sys-apps/baselayout: 2.3::gentoo
sys-apps/openrc: 0.22.2::gentoo
sys-apps/sandbox: 2.10-r2::gentoo
sys-devel/autoconf: 2.13::gentoo, 2.69-r2::gentoo
sys-devel/automake: 1.11.6-r2::gentoo, 1.12.6-r1::gentoo, 1.13.4-r1::gentoo, 1.14.1-r1::gentoo, 1.15-r2::gentoo
sys-devel/binutils: 2.26.1::gentoo
sys-devel/gcc: 4.9.3::gentoo, 4.9.4::gentoo
sys-devel/gcc-config: 1.8-r1::gentoo
sys-devel/libtool: 2.4.6-r2::gentoo
sys-devel/make: 4.2.1::gentoo
sys-kernel/linux-headers: 4.7::gentoo (virtual/os-headers)
sys-libs/glibc: 2.23-r2::gentoo
[…]
ABI="amd64"
ABI_X86="64"
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="@FREE freedist as-is"
ACCEPT_PROPERTIES="*"
ACCEPT_RESTRICT="*"
[…]
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CFLAGS_amd64="-m64"
CFLAGS_x32="-mx32"
CFLAGS_x86="-m32"
CHOST="x86_64-pc-linux-gnu"
CHOST_amd64="x86_64-pc-linux-gnu"
CHOST_x32="x86_64-pc-linux-gnux32"
CHOST_x86="i686-pc-linux-gnu
[…]
CXXFLAGS="-march=native -O2 -pipe"
[…]
FEATURES="assume-digests binpkg-logs buildpkg candy cgroup compress-build-logs config-protect-if-modified distlocks downgrade-backup ebuild-locks fail-clean fixlafiles merge-sync multilib-strict news parallel-fetch parallel-install preserve-libs protect-owned sandbox sfperms split-elog splitdebug test-fail-continue unknown-features-warn unmerge-backup unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync webrsync-gpg xattr"
[…]
LC_MESSAGES="C"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LDFLAGS_amd64="-m elf_x86_64"
LDFLAGS_x32="-m elf32_x86_64"
LDFLAGS_x86="-m elf_i386 |
|
|
| Back to top |
|
 |
fedeliallalinea Administrator


Joined: 08 Mar 2003 Posts: 31085 Location: here
|
Posted: Fri Oct 28, 2016 2:05 pm Post subject: |
|
|
You need to force compiler to use c standard 11 (-std=c11). This is possible with package.env.
| Code: | # nano /etc/portage/env/force-c11.conf
CFLAGS="${CFLAGS} -std=c11"
CXXFLAGS="${CXXFLAGS}"
# echo "=media-libs/jasper-1.900.15 force-c11.conf" >> /etc/portage/package.env |
_________________ Questions are guaranteed in life; Answers aren't. |
|
| Back to top |
|
 |
as.gentoo Guru


Joined: 07 Aug 2004 Posts: 319
|
Posted: Fri Oct 28, 2016 9:14 pm Post subject: |
|
|
| fedeliallalinea wrote: | You need to force compiler to use c standard 11 (-std=c11). This is possible with package.env.
| Code: | # nano /etc/portage/env/force-c11.conf
CFLAGS="${CFLAGS} -std=c11"
CXXFLAGS="${CXXFLAGS}"
# echo "=media-libs/jasper-1.900.15 force-c11.conf" >> /etc/portage/package.env |
|
Works, thanks!
I'd think choosing the right compiler - with the right options - usually works out of the box (ebuild?). |
|
| Back to top |
|
 |
Hu Administrator

Joined: 06 Mar 2007 Posts: 22088
|
Posted: Sat Oct 29, 2016 12:02 am Post subject: |
|
|
| In my opinion, the upstream build system should have automatically enabled the required standard support. Neither you nor Gentoo should have needed to do that. |
|
| Back to top |
|
 |
fedeliallalinea Administrator


Joined: 08 Mar 2003 Posts: 31085 Location: here
|
|
| Back to top |
|
 |
Hu Administrator

Joined: 06 Mar 2007 Posts: 22088
|
Posted: Sat Oct 29, 2016 3:38 pm Post subject: |
|
|
| I would characterize that as a workaround, not a fix. As I said in my prior post, if upstream writes code that needs C11 support, upstream ought to ship a build system that enables C11 support on its own. It is convenient for Gentoo users that a Gentoo maintainer modified the ebuild to work, but that does nothing for other distributions, and it does nothing to encourage upstream to ship a working build system. |
|
| Back to top |
|
 |
fedeliallalinea Administrator


Joined: 08 Mar 2003 Posts: 31085 Location: here
|
Posted: Tue Nov 01, 2016 9:35 am Post subject: |
|
|
@Hu
There is already a open bug on jasper github _________________ Questions are guaranteed in life; Answers aren't. |
|
| Back to top |
|
 |
|