waebbl / waebbl-gentoo

Personal overlay of gentoo ebuilds, loosely focused on the 3D domain.
17 stars 17 forks source link

freecad-9999 vs freeCAD-9999 when building, Not found, fails #120

Closed clytle374 closed 5 years ago

clytle374 commented 5 years ago

Checking out https://github.com/FreeCAD/FreeCAD.git to /var/tmp/portage/portage/media-gfx/freecad-9999/work/freecad-9999

Then we fail here The source directory '/var/tmp/portage/portage/media-gfx/freecad-9999/work/FreeCAD-9999' doesn't exist

Note the freecad vs FreeCAD difference. Here is the emerge -info and build.log. I'd also like to thank you for your efforts on this overlay. I've been running freecad from git for years and recently (switch to 17.1 profile to be exact) haven't been able to get it to work myself. Thanks again, Cory

 emerge --info =media-gfx/freecad-9999::waebbl
Portage 2.3.66 (python 3.6.5-final-0, default/linux/amd64/17.1/desktop/plasma, gcc-8.3.0, glibc-2.29-r2, 4.19.52-gentoo x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-4.19.52-gentoo-x86_64-Intel-R-_Core-TM-_i7-8750H_CPU_@_2.20GHz-with-gentoo-2.6
KiB Mem:    32813124 total,  29622996 free
KiB Swap:   33554428 total,  33554428 free
Timestamp of repository gentoo: Tue, 02 Jul 2019 03:30:01 +0000
Head commit of repository gentoo: 66275d642d04ee61f6e6369fae47ca9cade90a12
sh bash 4.4_p23-r1
ld GNU ld (Gentoo 2.32 p2) 2.32.0
app-shells/bash:          4.4_p23-r1::gentoo
dev-java/java-config:     2.2.0-r4::gentoo
dev-lang/perl:            5.28.2-r1::gentoo
dev-lang/python:          2.7.15::gentoo, 3.6.5::gentoo
dev-util/cmake:           3.14.3::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.6-r1::gentoo
sys-apps/openrc:          0.41.2::gentoo
sys-apps/sandbox:         2.13::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r4::gentoo
sys-devel/automake:       1.11.6-r3::gentoo, 1.13.4-r2::gentoo, 1.16.1-r1::gentoo
sys-devel/binutils:       2.32-r1::gentoo
sys-devel/gcc:            8.3.0-r1::gentoo
sys-devel/gcc-config:     2.0::gentoo
sys-devel/libtool:        2.4.6-r3::gentoo
sys-devel/make:           4.2.1-r4::gentoo
sys-kernel/linux-headers: 4.14-r1::gentoo (virtual/os-headers)
sys-libs/glibc:           2.29-r2::gentoo
Repositories:

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

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

qt
    location: /var/lib/layman/qt
    masters: gentoo
    priority: 50

waebbl
    location: /var/lib/layman/waebbl
    masters: gentoo
    priority: 50

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=skylake -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt"
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="-march=skylake -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN 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 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 sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="rsync://mirrors.rit.edu/gentoo/ ftp://ftp.gtlib.gatech.edu/pub/gentoo"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en_US"
MAKEOPTS="-j12"
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/portage"
USE="X a52 aac acl acpi activities alsa amd64 berkdb bluetooth branding bzip2 cairo cdda cdr cli consolekit crypt cups cxx dbus declarative dri dts dvd dvdr emboss encode exif fam flac fortran gdbm gif glamor gpm gtk iconv ipv6 jpeg kde kipi kwallet lcms ldap libnotify libtirpc mad mng mp3 mp4 mpeg multilib ncurses nls nptl ogg opengl openmp pam pango pcre pdf phonon plasma png policykit ppds qml qt5 readline sdl seccomp semantic-desktop spell ssl startup-notification svg tcpd tiff truetype udev udisks unicode upower usb vorbis widgets wxwidgets x264 xattr xcb xcomposite xml xv xvid 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="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 isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="efi-64" INPUT_DEVICES="evdev synaptics joystick" KERNEL="linux" L10N="en-US" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" NETBEANS_MODULES="apisupport cnd groovy gsf harness ide identity j2ee java mobility nb php profiler soa visualweb webcommon websvccommon xml" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-2" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_6" PYTHON_TARGETS="python2_7 python3_6" RUBY_TARGETS="ruby24" SANE_BACKENDS="hp" USERLAND="GNU" VIDEO_CARDS="nvidia" 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:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
cat /var/tmp/portage/portage/media-gfx/freecad-9999/temp/build.log
 * Package:    media-gfx/freecad-9999
 * Repository: waebbl
 * Maintainer: waebbl@gmail.com
 * Upstream:   https://www.freecadweb.org/tracker/
 * USE:        abi_x86_64 addonmgr amd64 arch complete drawing elibc_glibc fem idf image inspection kernel_linux material mesh openscad part_design path points python_targets_python3_6 raytracing reverseengineering robot ship show spreadsheet surface techdraw tux userland_GNU
 * FEATURES:   network-sandbox preserve-libs sandbox userpriv usersandbox
 * Checking for at least 6 GiB disk space at "/var/tmp/portage/portage/media-gfx/freecad-9999/temp" ...               [ ok ]
>>> Unpacking source...
 * Repository id: FreeCAD_FreeCAD.git
 * To override fetched repository properties, use:
 *   EGIT_OVERRIDE_REPO_FREECAD_FREECAD
 *   EGIT_OVERRIDE_BRANCH_FREECAD_FREECAD
 *   EGIT_OVERRIDE_COMMIT_FREECAD_FREECAD
 *   EGIT_OVERRIDE_COMMIT_DATE_FREECAD_FREECAD
 * 
 * Fetching https://github.com/FreeCAD/FreeCAD.git ...
git fetch https://github.com/FreeCAD/FreeCAD.git +HEAD:refs/git-r3/HEAD
git symbolic-ref refs/git-r3/media-gfx/freecad/0/__main__ refs/git-r3/HEAD
 * Checking out https://github.com/FreeCAD/FreeCAD.git to /var/tmp/portage/portage/media-gfx/freecad-9999/work/freecad-9999 ...
git checkout --quiet refs/git-r3/HEAD
GIT update -->
   repository:               https://github.com/FreeCAD/FreeCAD.git
   at the commit:            dbbf1aaefe9cd98e2abb8e927b969f007be9fd6e
>>> Source unpacked in /var/tmp/portage/portage/media-gfx/freecad-9999/work
 * ERROR: media-gfx/freecad-9999::waebbl failed (prepare phase):
 *   The source directory '/var/tmp/portage/portage/media-gfx/freecad-9999/work/FreeCAD-9999' doesn't exist
 * 
 * Call stack:
 *            ebuild.sh, line  780:  Called __ebuild_main 'prepare'
 *   phase-functions.sh, line 1072:  Called __dyn_prepare
 *   phase-functions.sh, line  384:  Called die
 * The specific snippet of code:
 *          die "The source directory '${S}' doesn't exist"
 * 
 * If you need support, post the output of `emerge --info '=media-gfx/freecad-9999::waebbl'`,
 * the complete build log and the output of `emerge -pqv '=media-gfx/freecad-9999::waebbl'`.
 * The complete build log is located at '/var/tmp/portage/portage/media-gfx/freecad-9999/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/portage/media-gfx/freecad-9999/temp/environment'.
 * Working directory: '/var/tmp/portage/portage/media-gfx/freecad-9999/homedir'
 * S: '/var/tmp/portage/portage/media-gfx/freecad-9999/work/FreeCAD-9999'
waebbl commented 5 years ago

@clytle374 Thanks for your report. I look into this. You might want to try the 0.18.2 release in the meantime if you want.

clytle374 commented 5 years ago

0.18.2 long story short, I got git working after fiddling with this. I have no explination on that.

Changing Line 135 S="${WORKDIR}/freecad-${PV}"
in freecad-9999.ebuild fixed that issue.

Had lots of issues with ${CASROOT} not pointing to /usr/lib64/opencascade-7.3.0/ros but to /usr/lib64/opencascade-7.3.0 instead. I changed the ebuild trying to fix it and it kept inserting a double /ros/ros in the path. But only halfway thought the build. No explanation on that either. Maybe opencascade isn't updating ${CASROOT} properly.

The 0.18.2 release failed in the same way as my git has been.

waebbl commented 5 years ago

Had lots of issues with ${CASROOT} not pointing to /usr/lib64/opencascade-7.3.0/ros but to /usr/lib64/opencascade-7.3.0 instead. I changed the ebuild trying to fix it and it kept inserting a double /ros/ros in the path. But only halfway thought the build. No explanation on that either. Maybe opencascade isn't updating ${CASROOT} properly.

Which opencascade do you have installed? From ::gentoo or from ::waebbl? They both have version 7.3.0 packages, but they are different.

The 0.18.2 release failed in the same way as my git has been.

That's strange. Maybe you need to re-emerge some dependencies? Tried using --deep and --newuse to emerge?

clytle374 commented 5 years ago

OCC is now from waebbl, was from portage before. I always update with -DuN, I believe it was broken in the 17.1 profile /lib switch. I had rebuild lots of the system trying to get it running. It started with not locating expat(what I got on 0.18.2), after hacking at build files for another 7 or 8 files, libz couldn't be found even after changing the path in like 3 place. Kept looking in /lib for it, and finding the wrong 32 bit lib. Tried git reset, make clean, deleted the build directory. Here is the thread over on the freecad forums. https://forum.freecadweb.org/viewtopic.php?f=4&t=37248 Warning, there is nothing to learn there.

That got it to build, sadly it crashes upon loading a model. Here's the terminal output. Funny it's mentioning the /tmp build in the output. Gotta work the next couple days, so I won't be around. But glad I found this place. I figure that I'll stay here, been fighting building freecad from source for at least 5 years and gentoo for over 10. Gentoo forums and the freecad forums don't seem to care too much about each other. lol

FreeCAD 0.19, Libs: 0.19R17234 (Git)
© Juergen Riegel, Werner Mayer, Yorik van Havre 2001-2019
  #####                 ####  ###   ####  
  #                    #      # #   #   # 
  #     ##  #### ####  #     #   #  #   # 
  ####  # # #  # #  #  #     #####  #   # 
  #     #   #### ####  #    #     # #   # 
  #     #   #    #     #    #     # #   #  ##  ##  ##
  #     #   #### ####   ### #     # ####   ##  ##  ##

libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
connect failed: No such file or directory
freecad: /var/tmp/portage/portage/media-gfx/freecad-9999/work/freecad-9999/src/Gui/Quarter/QuarterWidget.cpp:889: virtual void SIM::Coin3D::Quarter::QuarterWidget::paintEvent(QPaintEvent*): Assertion `w->isValid() && "No valid GL context found!"' failed.
KCrash: Application 'FreeCAD' crashing...
KCrash: Attempting to start /usr/lib64/libexec/drkonqi from kdeinit
sock_file=/var/run/user/1000/kdeinit5__0

[1]+  Stopped                 freecad
clytle374 commented 5 years ago

Here is what I found after messing around a bit more. I'm not expert here, just have been dealing with building freecad from git for a long time... lol. Here are the changes I had to make to get the -9999 to build and run on my system. Hopefully I can be helpful.

Changed line 135 to S="${WORKDIR}/freecad-${PV}"

Added line 195 -DFREECAD_USE_OCC_VARIANT:STRING="Official Version"

LIne 200 became 201 and changed to -DOCC_LIBRARY_DIR="${CASROOT}"/lib64

That left me with the crash, and error, in the last post. Looked around and found in the freecad forums to start freecad with this.

LD_PRELOAD=/usr/lib64/opengl/nvidia/lib/libGL.so FreeCAD

This isn't needed on the code I'm pulling directly from git. No idea why. I changed a lot of my build to the same options as this overlay too, trying to replicate.

I didn't know python 3.6 was working, that's good.

Thanks Cory

clytle374 commented 5 years ago

PS: I forgot. version 18 seems to work fine

waebbl commented 5 years ago

@clytle374 Could you please try to pull again and see whether the changed ebuild works? I tested in a clean chroot, first using default USE flags, and in a second run adding the mpi USE flag, to check whether the dependencies are all right.

I had the run-time issue you are describing with OpenGL before too. Temporarily I was also using the LD_PRELOAD assignment, but sadly I can't remember how I get it fixed.

clytle374 commented 5 years ago

That fixed it. I didn't see where you changed the OCC path, but it works too.. Any idea why? Thanks Cory

waebbl commented 5 years ago

The OCC path has been changed in the PR #114 some time ago already. I don't know where your issues regarding the OCC path actually came from. The fix in PR #114 fixed the missing / which has been removed from ${EROOT} and friends in EAPI 7. But it's been a long time, that I noticed the ros part missing from the OCC path. Glad it's working now :)