Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 558154 - app-admin/sagan-1.0.0_rc3 : /.../liblognorm.h:65:18: fatal error: json.h: No such file or directory
Summary: app-admin/sagan-1.0.0_rc3 : /.../liblognorm.h:65:18: fatal error: json.h: No...
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2015-08-19 12:22 UTC by Toralf Förster
Modified: 2021-03-11 08:02 UTC (History)
5 users (show)

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


Attachments
app-admin:sagan-1.0.0_rc3:20150819-110952.log (app-admin:sagan-1.0.0_rc3:20150819-110952.log,11.73 KB, text/plain)
2015-08-19 12:22 UTC, Toralf Förster
Details
emerge-history.txt (emerge-history.txt,433.06 KB, text/plain)
2015-08-19 12:22 UTC, Toralf Förster
Details
Proposal to fix the issue in Gentoo (bug_558154.diff,3.88 KB, patch)
2015-10-11 19:25 UTC, Thomas Deutschmann (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster gentoo-dev 2015-08-19 12:22:36 UTC
make[2]: Entering directory '/var/tmp/portage/app-admin/sagan-1.0.0_rc3/work/sagan-1.0.0RC3/src'
x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I..     -march=native -O2 -pipe -c -o sagan.o sagan.c
x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I..     -march=native -O2 -pipe -c -o sagan-classifications.o sagan-classifications.c
x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I..     -march=native -O2 -pipe -c -o sagan-config.o sagan-config.c
In file included from sagan-config.c:49:0:
/usr/include/liblognorm.h:65:18: fatal error: json.h: No such file or directory
 #include <json.h>
                  ^
compilation terminated.
Makefile:461: recipe for target 'sagan-config.o' failed
make[2]: *** [sagan-config.o] Error 1


$ cat info
  -----------------------------------------------------------------

  This is an unstable amd64 chroot image (named amd64-plasma-unstable_20150811-144142) at a hardened host acting as a tinderbox.

  Portage 2.2.20.1 (python 2.7.10-final-0, default/linux/amd64/13.0/desktop/plasma, gcc-4.9.3, glibc-2.21-r1, 4.1.4-hardened x86_64)
=================================================================
System uname: Linux-4.1.4-hardened-x86_64-Intel-R-_Core-TM-_i7-3770_CPU_@_3.40GHz-with-gentoo-2.2
KiB Mem:    16164628 total,   2764308 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Wed, 19 Aug 2015 09:45:01 +0000
sh bash 4.3_p42
ld GNU ld (Gentoo 2.25.1 p1.0) 2.25.1
app-shells/bash:          4.3_p42::gentoo
dev-java/java-config:     2.2.0::gentoo
dev-lang/perl:            5.22.0::gentoo
dev-lang/python:          2.7.10::gentoo, 3.4.3::gentoo
dev-util/cmake:           3.3.1::gentoo
dev-util/pkgconfig:       0.28-r3::gentoo
sys-apps/baselayout:      2.2::gentoo
sys-apps/openrc:          0.17::gentoo
sys-apps/sandbox:         2.6-r1::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r1::gentoo
sys-devel/automake:       1.9.6-r4::gentoo, 1.10.3-r1::gentoo, 1.11.6-r1::gentoo, 1.12.6::gentoo, 1.13.4::gentoo, 1.14.1::gentoo, 1.15::gentoo
sys-devel/binutils:       2.25.1::gentoo
sys-devel/gcc:            4.8.4::gentoo, 4.9.3::gentoo
sys-devel/gcc-config:     1.8::gentoo
sys-devel/libtool:        2.4.6-r1::gentoo
sys-devel/make:           4.1-r1::gentoo
sys-kernel/linux-headers: 4.1::gentoo (virtual/os-headers)
sys-libs/glibc:           2.21-r1::gentoo
Repositories:

local
    location: /usr/local/portage
    masters: gentoo

kde
    location: /var/lib/layman/kde
    sync-type: laymansync
    sync-uri: git://anongit.gentoo.org/proj/kde.git
    masters: gentoo
    priority: 50

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: 9999

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/fax /usr/share/config /usr/share/easy-rsa /usr/share/gnupg/qualified.txt /usr/share/maven-bin-3.2/conf /var/lib/hsqldb /var/lib/i2pd/certificates /var/spool/fax/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.5/ext-active/ /etc/php/apache2-php5.6/ext-active/ /etc/php/cgi-php5.5/ext-active/ /etc/php/cgi-php5.6/ext-active/ /etc/php/cli-php5.5/ext-active/ /etc/php/cli-php5.6/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -pipe"
DISTDIR="/var/tmp/distfiles"
EMERGE_DEFAULT_OPTS="--color=n --nospinner --tree --quiet-build --accept-properties=-interactive --accept-restrict=-fetch"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync network-sandbox news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://ftp.uni-erlangen.de/pub/mirrors/gentoo rsync://mirror.netcologne.de/gentoo/ ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/gor.bytemark.co.uk/gentoo/ rsync://ftp.snt.utwente.nl/gentoo"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j1"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
USE="X a52 aac acl acpi alsa amd64 berkdb bluetooth branding bzip2 cairo cdda cdr cli consolekit cracklib crypt cups cxx dbus declarative dri drmkms dts dvb dvd dvdr emboss encode exif fam ffmpeg firefox flac fortran fpm gd gdbm gif glamor gpm gtk3 iconv inifile ipv6 jpeg kde kipi lcms ldap libnotify logrotate mad mbox minizip mmx mmxext mng modules mp3 mp4 mpeg multilib ncurses nls nptl nss ogg opengl openmp pam pango pax_kernel pcre pdf phonon plasma png policykit ppds qml qt3support qt4 qt5 readline sdl seccomp semantic-desktop session sockets spell sse sse2 ssl startup-notification svg system-libvpx tcpd thinkpad threads tiff truetype udev udisks uml unicode upower usb usbredir vorbis widgets wxwidgets x264 xcb xcomposite xinerama xml xscreensaver xslt xv xvid zenmap zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en en_GB" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_4" RUBY_TARGETS="ruby19 ruby20" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga nouveau nv r128 radeon savage sis tdfx trident vesa via vmware dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON

  -----------------------------------------------------------------
Comment 1 Toralf Förster gentoo-dev 2015-08-19 12:22:39 UTC
Created attachment 409434 [details]
app-admin:sagan-1.0.0_rc3:20150819-110952.log
Comment 2 Toralf Förster gentoo-dev 2015-08-19 12:22:42 UTC
Created attachment 409436 [details]
emerge-history.txt
Comment 3 Ian Delaney (RETIRED) gentoo-dev 2015-09-04 08:03:29 UTC
python-gnupg # emerge -1 app-admin/sagan

yields

>>> Emerging (1 of 1) app-admin/sagan-1.0.0_rc3::gentoo
>>> Installing (1 of 1) app-admin/sagan-1.0.0_rc3::gentoo

See
Thu Aug 13 23:31:13 2015 >>> dev-libs/liblognorm-1.1.0
You have I believe a stable system. I am guessing the new version  (~)1.1.1 will see it pass.  Can you keyword it and install new version (~)1.1.1 and re-test? Otherwise slepnoga will have to.

( Installed versions:  1.1.0(07:22:41 26/03/15) )
Comment 4 Toralf Förster gentoo-dev 2015-09-04 12:29:09 UTC
(In reply to Ian Delaney from comment #3)
> python-gnupg # emerge -1 app-admin/sagan
> 
> yields
> 
> >>> Emerging (1 of 1) app-admin/sagan-1.0.0_rc3::gentoo
> >>> Installing (1 of 1) app-admin/sagan-1.0.0_rc3::gentoo
> 
> See
> Thu Aug 13 23:31:13 2015 >>> dev-libs/liblognorm-1.1.0
> You have I believe a stable system. I am guessing the new version  (~)1.1.1
> will see it pass.  Can you keyword it and install new version (~)1.1.1 and
> re-test? Otherwise slepnoga will have to.
> 
> ( Installed versions:  1.1.0(07:22:41 26/03/15) )

Well, it is an unstable system :
  >>"This is an unstable amd64 chroot image"

I downgraded liblognorm from 1.1.2 to 1.1.1 at that chroot tinderox image (was upgraded accordingly to the package history file) and re-emerged sagan (was installed fine with 1.1.0 the first time) but still got :

x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I..     -march=native -O2 -pipe -c -o sagan-lockfile.o sagan-lockfile.c
In file included from sagan-config.c:49:0:
/usr/include/liblognorm.h:65:18: fatal error: json.h: No such file or directory
 #include <json.h>
                  ^
compilation terminated.

I'll run a deep @world upgrade in that (in the meanwhile archived ) image and will see, if app-admin/sagan after that compiles fine.
Comment 5 Toralf Förster gentoo-dev 2015-09-04 17:56:25 UTC
(In reply to Toralf Förster from comment #4)
ion terminated.
> will see, if app-admin/sagan after that compiles fine.
nope, still fails
Comment 6 Toralf Förster gentoo-dev 2015-09-04 18:23:20 UTC
I I just changed in /usr/include/liblognorm.h
 #include <json.h>
into
 #include <json-c/json.h>
and then it works.


FWIW:

tor-relay / # eix -I liblognorm
[I] dev-libs/liblognorm
     Available versions:  0.3.6 (~)0.3.7 1.0.1(0/1) 1.1.0(0/1) (~)1.1.1(0/2) [M](~)1.1.2(0/2) {debug doc pcre static-libs test}
     Installed versions:  1.1.1(02:19:12 PM 09/04/2015)(pcre -debug -doc -static-libs -test)
     Homepage:            http://www.liblognorm.com
     Description:         Fast samples-based log normalization library

tor-relay / # eix -I json-c
[I] dev-libs/json-c
     Available versions:  0.9-r1 (~)0.10-r1(0/0) 0.11(0/0) 0.11-r1(0/0) (~)0.12(0/0) {doc static-libs ABI_MIPS="n32 n64 o32" ABI_PPC="32 64" ABI_S390="32 64" ABI_X86="32 64 x32"}
     Installed versions:  0.12(03:50:06 PM 08/13/2015)(-doc -static-libs ABI_MIPS="-n32 -n64 -o32" ABI_PPC="-32 -64" ABI_S390="-32 -64" ABI_X86="64 -32 -x32")
     Homepage:            https://github.com/json-c/json-c/wiki
     Description:         A JSON implementation in C





USE="
      mmx sse sse2
      -bindist -cdinstall -oci8

      -avx drmkms dvb ffmpeg -fontconfig fpm gd -gtk gtk3 -imap
      inifile kde ldap logrotate mbox minizip nss pax_kernel
      policykit sockets system-libvpx thinkpad threads udev uml
      usbredir vorbis widgets xscreensaver xslt zenmap
qt5
"
Comment 7 Thomas Deutschmann (RETIRED) gentoo-dev 2015-10-11 14:57:04 UTC
For me, there is nothing wrong with liblognorm. It isn't wrong to just include "json.h". But for me it is wrong to hardcode to "json-c/json.h" like Toralf's workaround suggests.

Because liblognorm depends on json-c it would be much easier if liblognorm would create a pkgconfig file which app-admin/sagan could just use. This pc file would contain the json-c includedir liblognorm is using.

But because app-admin/sagan also depends on json-c, sagan should use json-c's pc file so that the includedir already contains the json-c path which would allow liblognorm's include of "json.h".
Comment 8 Thomas Deutschmann (RETIRED) gentoo-dev 2015-10-11 19:25:36 UTC
Created attachment 414376 [details, diff]
Proposal to fix the issue in Gentoo

My previous comment was wrong, liblognorm already installs a pc file but it is called "lognorm".

If the file would look like

--- /usr/lib/pkgconfig/lognorm.pc.old       2015-10-11 20:45:15.904693618 +0200
+++ /usr/lib/pkgconfig/lognorm.pc     2015-10-11 20:44:44.657260150 +0200
@@ -5,6 +5,7 @@

 Name: lognorm
 Description: fast samples-based log normalization library
+Requires.private: json-c
 Version: 1.1.2
-Libs: -L${libdir} -llognorm -lestr
+Libs: -L${libdir} -llognorm -lestr -ljson-c
 Cflags: -I${includedir}

it would be very easy for sagan (or any liblognorm consumer) to pick up liblognorm including json-c's path.

I'll fill a bug with liblognorm upstream to discuss this change.


However, even if liblognorm would install the new pc file, sagan must be updated to use PKG_CHECK_MODULES instead of AC_CHECK_* so that we can access JSON-C's Cflag variable for example.

Please review the attached patch which will make app-admin/sagan work with the current version in tree, replacing the old json_header_location.patch with a new one using PKG_CHECK_MODULES which is supported by all deps on Gentoo.

The magic happens in src/Makefile.am with setting sagan_CFLAGS.
Comment 9 Ian Delaney (RETIRED) gentoo-dev 2015-10-13 07:16:24 UTC
This is output

 * QA Notice: This ebuild installs into paths that should be created at runtime.
 *  To fix, simply do not install into these directories.  Instead, your package
 *  should create dirs on the fly at runtime as needed via init scripts/etc...
 * 
 *   var/run
 *   var/run/sagan


something to tidy up later. it is non critical.

commit 2ef0fbb716790037c8d7eeb48a475478a213bcfb
Author: Ian Delaney <idella4@gentoo.org>
Date:   Tue Oct 13 15:12:44 2015 +0800

    app-admin/sagan: patch added to correct location of header liblognorm.h
    
    patch added via gentoo bug thanks to 'whissi', added (for now)
    as co-manitainer in metadata.
    
    Gentoo bug: #558154

Thomas D. I have come across you before. I have added you as co-maintainer. If you explicitly wish to not be designated a co-maintainer, indicate so here and I shall remove you.
Comment 10 Thomas Deutschmann (RETIRED) gentoo-dev 2015-10-13 11:49:28 UTC
Thanks for adding me as co-maintainer but in this case please revert: I don't really use sagan. I only care about liblognorm and wanted to make sure that there is no problem with liblognorm.