Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 827102 - sci-electronics/kicad-6.0.0_rc1: Build fails: file STRINGS file "/usr/include/Standard_Version.hxx" cannot be read.
Summary: sci-electronics/kicad-6.0.0_rc1: Build fails: file STRINGS file "/usr/include...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Zoltan Puskas
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2021-11-24 11:00 UTC by Ian Pickworth
Modified: 2021-11-24 14:44 UTC (History)
6 users (show)

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


Attachments
Build log (sci-electronics:kicad-6.0.0_rc1:20211124-104755.log,10.26 KB, text/x-log)
2021-11-24 11:00 UTC, Ian Pickworth
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ian Pickworth 2021-11-24 11:00:13 UTC
Created attachment 755954 [details]
Build log

It fails trying to determine the OpenCASCADE version

Extracts from build log at failure point:
....
-- Found ngspice: /usr/include  
CMake Error at CMakeModules/FindOCC.cmake:151 (file):
  file STRINGS file "/usr/include/Standard_Version.hxx" cannot be read.
Call Stack (most recent call first):
  CMakeLists.txt:731 (find_package)
....

and

...
-- Found OCC: /usr/include (found version "..") 
-- Found OpenCASCADE Standard Edition version: ..
--  ++ OpenCASCADE Standard Edition include directory: /usr/include
--  ++ OpenCASCADE Standard Edition shared libraries directory: /usr/lib64
CMake Error at CMakeLists.txt:738 (MESSAGE):
  ================================================================

  OpenCASCADE version ..  was found.

    KiCad requires a minimum version of 7.3.0

  ================================================================
...
Comment 1 Ian Pickworth 2021-11-24 11:01:43 UTC
ian2 ~ # emerge --info '=sci-electronics/kicad-6.0.0_rc1::gentoo'
Portage 3.0.28 (python 3.9.8-final-0, default/linux/amd64/17.1, gcc-11.2.0, glibc-2.33-r7, 5.15.4-gentoo x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-5.15.4-gentoo-x86_64-AMD_Ryzen_7_2700_Eight-Core_Processor-with-glibc2.33
KiB Mem:    65826204 total,   4980520 free
KiB Swap:   16777212 total,  16768480 free
Timestamp of repository gentoo: Wed, 24 Nov 2021 00:15:01 +0000
Head commit of repository gentoo: ac83917cdf245d5f3f6fbb50ed2b947a45415100
Timestamp of repository KBrown-pub: Sun, 21 Nov 2021 14:21:32 +0000
Head commit of repository KBrown-pub: d22b67a060639bade7c4eaa5f893e1407ecba317

Timestamp of repository src_prepare-overlay: Tue, 23 Nov 2021 20:51:19 +0000
Head commit of repository src_prepare-overlay: beeb8da9a8f0cc3c67ef19445a7f0f04a6336bf3

Timestamp of repository steam-overlay: Tue, 09 Nov 2021 10:53:07 +0000
Head commit of repository steam-overlay: b21d724e69a176a398cae2db70172cb9dfede48a

sh bash 5.1_p8
ld GNU ld (Gentoo 2.37_p1 p0) 2.37
app-shells/bash:          5.1_p8::gentoo
dev-java/java-config:     2.3.1::gentoo
dev-lang/perl:            5.34.0-r3::gentoo
dev-lang/python:          2.7.18_p13::gentoo, 3.9.8::gentoo
dev-lang/rust:            1.56.1::gentoo
dev-util/cmake:           3.20.5::gentoo
sys-apps/baselayout:      2.7-r3::gentoo
sys-apps/openrc:          0.44.8::gentoo
sys-apps/sandbox:         2.25::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.71-r1::gentoo
sys-devel/automake:       1.13.4-r2::gentoo, 1.16.4::gentoo
sys-devel/binutils:       2.37_p1::gentoo
sys-devel/gcc:            11.2.0::gentoo
sys-devel/gcc-config:     2.4::gentoo
sys-devel/libtool:        2.4.6-r6::gentoo
sys-devel/make:           4.3::gentoo
sys-kernel/linux-headers: 5.10-r1::gentoo (virtual/os-headers)
sys-libs/glibc:           2.33-r7::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.uk.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-verify-jobs: 0
    sync-rsync-verify-metamanifest: yes
    sync-rsync-verify-max-age: 24
    sync-rsync-extra-opts: 

KBrown-pub
    location: /var/db/repos/KBrown-pub
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/KBrown-pub.git
    masters: gentoo

irp-overlay
    location: /var/lib/irp-overlay
    masters: gentoo

src_prepare-overlay
    location: /var/db/repos/src_prepare-overlay
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/src_prepare-overlay.git
    masters: gentoo

steam-overlay
    location: /var/db/repos/steam-overlay
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/steam-overlay.git
    masters: gentoo

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="@FREE"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /var/bind"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -pipe"
DISTDIR="/usr/portage/distfiles"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs clean-logs config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms split-elog strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_GB.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j16"
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 --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="X a52 aac acl alsa amd64 bluetooth branding bzip2 cairo cdda cli crypt cups dbus dri drm dts dvb dvb_cards_dibusb-usb1 dvb_cards_dibusb-usb2 elogind encode exif fbcondecor flac fortran gdbm gif gpm gtk iconv icu ipv6 jpeg lcms ldap libglvnd libnotify libtirpc mad mmx mng mp3 mpeg multilib ncurses netirfc nls nptl ogg opengl openmp pam pango pcre pdf png policykit pulseaudio readline sdl seccomp split-usr sse sse2 ssl svg text tiff truetype udev udisks unicode upower usb v4l vaapi vdpau vorbis vulkan vulkan-overlay x264 xattr xfce_plugins_brightness xfce_plugins_clock xfce_plugins_multiload-nandhp xfce_plugins_power xfce_plugins_trash xfce_plugins_xmonad xml xvid zlib" ABI_X86="64" ADA_TARGET="gnat_2019" 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="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="coreboot efi-32 efi-64 pc" INPUT_DEVICES="libinput joystick" KERNEL="linux" L10N="en en-GB" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-3 php7-4" POSTGRES_TARGETS="postgres12 postgres13" PYTHON_SINGLE_TARGET="python3_9" PYTHON_TARGETS="python3_9" QEMU_SOFTMMU_TARGETS="aarch64 arm i386 x86_64" QEMU_USER_TARGETS="x86_64" RUBY_TARGETS="ruby26 ruby27" USERLAND="GNU" VIDEO_CARDS="amdgpu radeon radeonsi v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq proto steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RUSTFLAGS

ian2 ~ #
Comment 2 Ian Pickworth 2021-11-24 11:04:23 UTC
ian2 ~ # equery uses sci-electronics/kicad
[ Legend : U - final flag setting for installation]
[        : I - package is installed with flag     ]
[ Colors : set, unset                             ]
 * Found these USE flags for sci-electronics/kicad-6.0.0_rc1:
 U I
 - - doc                            : Add extra documentation (API, Javadoc, etc). It is recommended to enable per package
                                      instead of globally
 + - examples                       : Install examples, usually source code
 + - ngspice                        : Enable circuit simulation 
 + - occ                            : Enable viewing 3D rendering of designs via opencascade 
 + + openmp                         : Build support for the OpenMP (support parallel computing), requires >=sys-devel/gcc-4.2
                                      built with USE="openmp"
 + - pcm                            : Enable plugin content manager 
 - - python                         : Enable python scripting support 
 - - python_single_target_python3_8 : Build for Python 3.8 only
 + + python_single_target_python3_9 : Build for Python 3.9 only
ian2 ~ # 

-------------------------------------
ian2 ~ # equery uses sci-libs/opencascade
[ Legend : U - final flag setting for installation]
[        : I - package is installed with flag     ]
[ Colors : set, unset                             ]
 * Found these USE flags for sci-libs/opencascade-7.5.3-r3:
 U I
 - - debug     : Enable extra debug codepaths, like asserts and extra output.
                 If you want to get meaningful backtraces see https://wiki.gent
                 oo.org/wiki/Project:Quality_Assurance/Backtraces
 - - doc       : Add extra documentation (API, Javadoc, etc). It is recommended
                 to enable per package instead of globally
 - - examples  : Install examples, usually source code
 + + ffmpeg    : Enable ffmpeg/libav-based audio/video codec support
 + + freeimage : Enable support for image i/o via media-libs/freeimage
 + + gles2     : Use OpenGL ES 2.0 
 + + json      : Enable JSON support through dev-libs/rapidjson
 - - optimize  : Don't clear allocated memory. Use optimized memory manager
                 unless tbb USE flag is set. 
 - - tbb       : Enable multithreading with the Intel Threads Building Block
                 dev-cpp/tbb
 + + vtk       : Enable Visualization Toolkit support via sci-libs/vtk
ian2 ~ #
Comment 3 email200202 2021-11-24 12:40:22 UTC
Same here.

This workaround fixed it:

# ln -s /usr/include/opencascade-7.5.3/Standard_Version.hxx /usr/include/Standard_Version.hxx
Comment 4 Ian Pickworth 2021-11-24 13:19:06 UTC
(In reply to email200202 from comment #3)
> Same here.
> 
> This workaround fixed it:
> 
> # ln -s /usr/include/opencascade-7.5.3/Standard_Version.hxx
> /usr/include/Standard_Version.hxx

I can confirm that this workaround got the compilation going, but...

It then failed with this:
....
/var/tmp/portage/sci-electronics/kicad-6.0.0_rc1/work/kicad-6.0.0-rc1/utils/kicad2step/kicad2step_app.cpp:38:10: fatal error: Standard_Failure.hxx: No such file or directory
   38 | #include <Standard_Failure.hxx> // In open cascade
      |          ^~~~~~~~~~~~~~~~~~~~~~
.....

Does this mean there are bugs in the opencascade ebuild?
Comment 5 email200202 2021-11-24 13:21:15 UTC
The above workaround will just fix the initial error but it will fail later. The whole directory /usr/include/opencascade-7.5.3/ should be included in the search path.
Comment 6 Ian Pickworth 2021-11-24 13:32:32 UTC
(In reply to Ian Pickworth from comment #4)
> (In reply to email200202 from comment #3)
> > Same here.
> > 
> > This workaround fixed it:
> > 
> > # ln -s /usr/include/opencascade-7.5.3/Standard_Version.hxx
> > /usr/include/Standard_Version.hxx
> 
> I can confirm that this workaround got the compilation going, but...
> 
> It then failed with this:
> ....
> /var/tmp/portage/sci-electronics/kicad-6.0.0_rc1/work/kicad-6.0.0-rc1/utils/
> kicad2step/kicad2step_app.cpp:38:10: fatal error: Standard_Failure.hxx: No
> such file or directory
>    38 | #include <Standard_Failure.hxx> // In open cascade
>       |          ^~~~~~~~~~~~~~~~~~~~~~
> .....
> 
> Does this mean there are bugs in the opencascade ebuild?

I tried this:
ln -s /usr/include/opencascade-7.5.3 /usr/include/opencascade

but it failed in configuration as per original report.
Comment 7 Ian Pickworth 2021-11-24 13:33:07 UTC
(In reply to email200202 from comment #5)
> The above workaround will just fix the initial error but it will fail later.
> The whole directory /usr/include/opencascade-7.5.3/ should be included in
> the search path.

How does one do that?
Comment 8 Yehoshua Wallach 2021-11-24 13:45:05 UTC
I found (and fixed) the bug, the ebuild was a bit messed up.

see PR#23067 at the gentoo github (can't post the URL, sorry).
Comment 9 Ian Pickworth 2021-11-24 14:16:01 UTC
(In reply to Yehoshua Wallach from comment #8)
> I found (and fixed) the bug, the ebuild was a bit messed up.
> 
> see PR#23067 at the gentoo github (can't post the URL, sorry).

I found your patch here:
https://github.com/gentoo/gentoo/pull/23067/commits/de2d8409c55b925f24717b4bc784c83df9c31761

I edited the ebuild file to move the three lines up as in the patch:
/usr/portage/sci-electronics/kicad/kicad-6.0.0_rc1.ebuild

Regenerated the manifest, re-ran the emerge...

...and the emerge worked.

Thanks for the prompt response.
Comment 10 Larry the Git Cow gentoo-dev 2021-11-24 14:43:19 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c54acff8e9f994aa321e26da3d24120166553ba2

commit c54acff8e9f994aa321e26da3d24120166553ba2
Author:     Yehoshua Pesach Wallach <yehoshuapw@gmail.com>
AuthorDate: 2021-11-24 13:26:16 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2021-11-24 14:43:03 +0000

    sci-electronics/kicad: fix cmake flags for occ
    
    Closes: https://bugs.gentoo.org/827102
    Package-Manager: Portage-3.0.28, Repoman-3.0.3
    Signed-off-by: Yehoshua Pesach Wallach <yehoshuapw@gmail.com>
    Closes: https://github.com/gentoo/gentoo/pull/23067
    Signed-off-by: Sam James <sam@gentoo.org>

 sci-electronics/kicad/kicad-6.0.0_rc1.ebuild | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
Comment 11 Larry the Git Cow gentoo-dev 2021-11-24 14:44:06 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cdfcab5d246095245d15a509494e5cc0073bd2c2

commit cdfcab5d246095245d15a509494e5cc0073bd2c2
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2021-11-24 14:43:51 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2021-11-24 14:43:51 +0000

    sci-electronics/kicad: fix oce logic for live too
    
    Bug: https://bugs.gentoo.org/827102
    Signed-off-by: Sam James <sam@gentoo.org>

 sci-electronics/kicad/kicad-9999.ebuild | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)