Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 741978 - sci-chemistry/vmd-1.9.4_alpha43 parallel buil fails, MAKEOPTS="-j1" works
Summary: sci-chemistry/vmd-1.9.4_alpha43 parallel buil fails, MAKEOPTS="-j1" works
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Alexey Shvetsov
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-09-12 22:54 UTC by Hypoon
Modified: 2020-09-24 14:46 UTC (History)
3 users (show)

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


Attachments
build.log (vmd_emerge_build_log,361.40 KB, text/plain)
2020-09-12 22:54 UTC, Hypoon
Details
build.log, pasted to avoid ANSI color codes (vmd_emerge_build_log_noescape,272.09 KB, text/plain)
2020-09-12 22:58 UTC, Hypoon
Details
Naive update of vmd-1.9.3-gentoo-plugins.patch (vmd-1.9.4-gentoo-plugins.patch,24.04 KB, patch)
2020-09-13 19:06 UTC, Hypoon
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Hypoon 2020-09-12 22:54:07 UTC
I can't identify the actual error that is crashing make, but vmd is not building on my machine.

emerge =sci-chemistry/vmd-1.9.4_alpha43
fails with:
make: *** [Make-arch:303: LINUX] Error 2

Please see build.log for more detail.

Reproducible: Always




$ emerge -pqv '=sci-chemistry/vmd-1.9.4_alpha43::gentoo'
[ebuild    fU ] sci-chemistry/vmd-1.9.4_alpha43 [1.9.3-r5] USE="povray sqlite tachyon xinerama -cuda -gromacs -msms" PYTHON_SINGLE_TARGET="python3_7%* -python3_6% -python3_8% -python3_9% (-python2_7%*)" 

$ emerge --info '=sci-chemistry/vmd-1.9.4_alpha43::gentoo'
Portage 3.0.4 (python 3.7.8-final-0, default/linux/amd64/17.1/desktop, gcc-9.3.0, glibc-2.31-r6, 5.8.1-gentoo x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-5.8.1-gentoo-x86_64-AMD_Ryzen_7_2700X_Eight-Core_Processor-with-gentoo-2.7
KiB Mem:    32886336 total,  24084780 free
KiB Swap:   33558524 total,  33558524 free
Timestamp of repository gentoo: Sat, 12 Sep 2020 14:15:01 +0000
Head commit of repository gentoo: 4eb601918c62b896d0cc1c2afbdd36dbb4f557a3
Head commit of repository haskell: 4c4d27ced7bdd02a48e2167975d711a26ccda27f

sh bash 5.0_p18
ld GNU ld (Gentoo 2.33.1 p2) 2.33.1
app-shells/bash:          5.0_p18::gentoo
dev-java/java-config:     2.3.1::gentoo
dev-lang/perl:            5.30.3::gentoo
dev-lang/python:          2.7.18-r1::gentoo, 3.7.8-r2::gentoo, 3.8.5::gentoo
dev-util/cmake:           3.16.5::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.7::gentoo
sys-apps/openrc:          0.42.1::gentoo
sys-apps/sandbox:         2.18::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r5::gentoo
sys-devel/automake:       1.16.1-r1::gentoo
sys-devel/binutils:       2.33.1-r1::gentoo
sys-devel/gcc:            9.3.0-r1::gentoo
sys-devel/gcc-config:     2.3.1::gentoo
sys-devel/libtool:        2.4.6-r6::gentoo
sys-devel/make:           4.2.1-r4::gentoo
sys-kernel/linux-headers: 5.8::gentoo (virtual/os-headers)
sys-libs/glibc:           2.31-r6::gentoo
Repositories:

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

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

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

crossdev
    location: /usr/local/portage-crossdev
    masters: gentoo
    priority: 10

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="@FREE LSI-tw_cli ipw2100-fw ipw3945 Amazon bonnie AVASYS Mellanox-AS-IS intel-ucode shmux NVIDIA-r1 ISSL JSON SmartLabs man-pages man-pages-posix-2013 LDP-1 CC-BY-SA-1.0 mplus-fonts BitstreamVera UbuntuFontLicense-1.0 CC-PD CC-SA-1.0 MaxMind2 myspell-en_CA-KevinAtkinson Texinfo-manual LDP-1a wxWinFDL-3 BAEKMUK man-pages-posix quake1-textures vlgothic GPL-1+ CC-BY-SA-2.5 CC-BY-2.5 FDL-1.1+ FDL-1.2+ GPL-3+ FDL-1.3 Arphic CC-BY-SA-4.0 OFL-1.1 FDL-1.3+ IPAfont CC-BY-SA-3.0 FreeArt GPL-2+ OFL CC-BY-SA-2.0 GPL-2 FDL-1.1 CC-BY-4.0 CC-BY-3.0 GPL-3 OPL GPL-1 FDL-1.2 CC-BY-2.0 W3C APSL-2 HPND AFL-3.0 GPL-1+ PHP-3 Ms-PL nethack MPL-1.0 CPL-1.0 IBM GPL-3+ PSF-2 LGPL-2.1+ LGPL-2.1 CPAL-1.0 Boost-1.0 BSD-2 OFL-1.1 Watcom-1.0 APL-1.0 ECL-2.0 BSD IPAfont Sleepycat EPL-1.0 ISC NOSA OSL-2.1 AGPL-3+ PHP-3.01 UoI-NCSA QPL GPL-2+ CDDL ZLIB GPL-2 Artistic LGPL-2+ Artistic-2 MPL-1.1 GPL-3 Apache-2.0 EPL-2.0 ZPL AGPL-3 LPPL-1.3c LGPL-3+ POSTGRESQL wxWinLL-3 LGPL-3 CNRI MIT Apache-1.1 EUPL-1.1 MPL-2.0 APSL-2 LPPL-1.2 AFL-3.0 OSL-1.1 Ms-PL Zend-2.0 MPL-1.0 CPL-1.0 IBM gnuplot NPL-1.1 OSL-2.0 CPAL-1.0 EPL-1.0 QPL-1.0 OSL-2.1 PHP-3.01 QPL Apache-1.0 CDDL AFL-2.1 FraunhoferFDK MPL-1.1 openssl EPL-2.0 BSD-4 CNRI Apache-1.1 EUPL-1.1 W3C HPND GPL-3+-with-cuda-exception GPL-1+ FTL GPL-2-with-classpath-exception metapackage Unlicense GPL-3-with-openssl-exception GPL-3+ PYTHON GPL-2-with-font-exception LGPL-2.1+ PSF-2 Ruby LGPL-2.1 PSF-2.3 GPL-3+-with-cuda-openssl-exception IJG Boost-1.0 BSD-2 unicode LGPL-2-with-linking-exception LGPL-3-with-linking-exception LGPL-2.1-with-linking-exception qwt ECL-2.0 tanuki-community BSD Sleepycat vim ISC gcc-runtime-library-exception-3.1 AGPL-3+ UoI-NCSA GPL-2+-with-openssl-exception PSF-2.2 GPL-3+-with-opencl-exception SGI-B-2.0 wxWinLL-3.1 GPL-2-with-MySQL-FLOSS-exception GPL-2+ Clear-BSD Apache-2.0-with-LLVM-exceptions CC0-1.0 GPL-3+-with-opencl-openssl-exception GPL-2 LGPL-2+ LGPL-2 PSF-2.4 Nokia-Qt-LGPL-Exception-1.1 UPX-exception libgcc Artistic-2 GPL-2-with-linking-exception GPL-3 libstdc++ Apache-2.0 public-domain OPENLDAP CeCILL-2 GPL-1 AGPL-3 ZPL LGPL-3+ GPL-3-with-font-exception Transmission-OpenSSL-exception Ruby-BSD GPL-2-with-exceptions GPL-3+-with-autoconf-exception LGPL-3 MIT WTFPL-2 ZLIB Clarified-Artistic MPL-2.0 URT ElementTree pngcrush canfep JOVE the-Click-license CDDL-1.1 matplotlib FLEX HTML-Tidy gsm File-MMagic rwpng Flashpix totd Khronos-CLHPP BSD-with-disclosure FastCGI docbook Time-Format XC icu Princeton Sendmail-Open-Source pngnq Crypt-IDEA CeCILL-C buddy rdisc tablelist LIBGLOSS FVWM inner-net Toyoda sdlsasteroids gd w3m feh symlinks UCAR-Unidata dom4j repoze BSD-with-attribution xbatt DES MIT-with-advertising Time-modules lsof JDOM libpng mpich2 VTK ErlPL-1.1 Sympow-BSD CDDL-Schily CAOSL shrimp Subversion x2x alternate IDPL Allegro bufexplorer.vim AIFFWriter.m boehm-gc tm-align perforce Info-ZIP PCRE JNIC libmng rc htmlc par LambdaMOO NEWLIB Old-MIT torque-2.5 CPL-0.5 libtiff flexmock TeX netcat ipadic NCSA-HDF xtrs sash Snd imagemagick freetts iASL regexp-UofT curl BEER-WARE DUMB-0.9.3 LPPL-1.3 tcltk CMake BSD-1 SSLeay ngrep Sendmail BZIP2 minpack Openwall TeX-other-free CRACKLIB Mini-XML scanlogd psutils Ispell libpng2 RSA bea.ri.jsr173 mm photopc xboing openafs-krb5-a LPPL-1.3b tcp_wrappers_license AMPAS Emacs Xdebug SVFL ZSH Interbase-1.0 otter FLTK eGenixPublic-1.1 PHP-2.02 wm2 SMAIL Broadcom freedist MicroChip-SDCC bh-luxi no-source-code sun-jlfgr qlogic-fibre-channel-firmware unRAR Atmel linux-fw-redistributable ipw2200-fw"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /opt/brother/scanner/brscan4/brsanenetdevice4.cfg /usr/lib64/libreoffice/program/sofficerc /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 /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=native -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="-march=native -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 qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-march=native -O2 -pipe"
GENTOO_MIRRORS="https://mirrors.rit.edu/gentoo/ http://gentoo.mirrors.tds.net/gentoo/ https://mirror.leaseweb.com/gentoo/ http://gentoo.ussg.indiana.edu/"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j18"
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 acpi alsa amd64 berkdb bluetooth branding bzip2 cairo cdda cdr cli crypt cups dbus dri dts dvd dvdr elogind emboss encode exif flac fortran gdbm gif gpm gui iconv icu ipv6 jack jpeg lcms libglvnd libnotify libtirpc logrotate mad mng mp3 mp4 mpeg multilib ncurses nls nptl ogg opengl openmp pam pango pcre pdf png policykit readline sdl seccomp spell split-usr sqlite ssl startup-notification svg tcpd tiff truetype udev udisks unicode upower usb vdpau vorbis x264 xattr xcb xetex xinerama xml xv xvid xvmc zlib" ABI_X86="64" ADA_TARGET="gnat_2018" ALSA_CARDS="hda-intel" 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="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt sha sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3" 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" INPUT_DEVICES="evdev libinput roccat_kova2016" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-2 php7-3 php7-4" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_7" PYTHON_TARGETS="python2_7 python3_7" RUBY_TARGETS="ruby25" 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, LINGUAS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Hypoon 2020-09-12 22:54:32 UTC
Created attachment 659883 [details]
build.log
Comment 2 Hypoon 2020-09-12 22:58:57 UTC
Created attachment 659886 [details]
build.log, pasted to avoid ANSI color codes
Comment 3 Hypoon 2020-09-12 23:03:49 UTC
I originally mentioned this issue in a comment of bug #735462. One idea there was that this may be related to parallel make.
Comment 4 Hypoon 2020-09-12 23:14:24 UTC
I ran two emerges back-to-back, and I can confirm: MAKEOPTS="-j1" is a successful workaround.
Comment 5 Pacho Ramos gentoo-dev 2020-09-13 10:47:17 UTC
Probably building plugins in serial is enough, can you try changing:
src_compile() {
        # build plugins
        cd "${WORKDIR}"/plugins || die

        emake \
                ${EMAKEOPTS[@]} \
                LINUX

        # build vmd
        cd "${S}"/src || die
        emake
}


to append "-j1" after the first emake? That way plugins would be built in serial while main vmd still in parallel

Thanks
Comment 6 Hypoon 2020-09-13 15:42:52 UTC
Yes, that works.
Comment 7 Hypoon 2020-09-13 16:19:28 UTC
After a second look, I found this in the build log:

make[2]: *** No rule to make target '../compile/lib_LINUX/molfile/libmolfile_plugin.a', needed by '../compile/lib_LINUX/bin/catdcd5.2/catdcd'.  Stop.
make[2]: *** Waiting for unfinished jobs....
./catdcd.c:17:10: fatal error: libmolfile_plugin.h: No such file or directory
   17 | #include "libmolfile_plugin.h"
      |          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.

It looks like this might have been fixed in one of the 1.9.3 patches. Are those patches still being applied? Perhaps they simply need to be updated for version 1.9.4.
Comment 8 Hypoon 2020-09-13 19:05:32 UTC
Yes, this was fixed in one vmd-1.9.3-gentoo-plugins.patch, from the vmd-1.9.3-gentoo-patches.tar.xz files.

That patch does not work as-is on version 1.9.4, so I updated it slightly so that it applies to version 1.9.4 sources. It's only a very naive update. There are many lines where the original patch changes SHLD to SHXXLD, but it doesn't make the change in *every* case. There are a couple new cases that fit the same pattern in version 1.9.4, but without knowing the rule for which cases get changed and which cases don't, I left them as SHLD. Perhaps the original author can provide insight as to whether the new 1.9.4 additions should also be changed to SHXXLD.
Comment 9 Hypoon 2020-09-13 19:06:01 UTC
Created attachment 660045 [details, diff]
Naive update of vmd-1.9.3-gentoo-plugins.patch
Comment 10 Pacho Ramos gentoo-dev 2020-09-13 20:49:07 UTC
Thanks for updating the patch

Personally I would prefer to have the patch a bit more "documented" to be able to send to upstream... Currently, it seems to fix LDFLAGS, fix the SHXXLD usage, and I guess the parallel build issue is fixed in plugins/Makefile part, right?

I would like to send it to upstream but, in its current form... it's like a ton of changes they will likely reject as-is :/
Comment 11 Hypoon 2020-09-13 21:30:52 UTC
Yeah, the patches make a lot of changes and it's hard to know what each change fixes. Perhaps reach out to the name/email address at the top of "vmd-1.9.3-gentoo-plugins.patch".

I am not comfortable enough with their behavior to document them, unfortunately.

I compared the vmd-1.9.3 patches against the existing vmd-1.9.4 patches and I did notice one other thing missing. I saw that vmd-1.9.3-gentoo-base.patch got mostly incorporated into vmd-1.9.4-gentoo-paths.patch, except for one change:

@@ -2244,7 +2222,7 @@ if ($config_arch eq "LINUXAMD64") {
       $arch_template_repository = "foobar";
       $arch_shlibname   = "so";
       $arch_shcppopts   = "-fPIC";
-      $arch_shldopts    = "";
+      $arch_shldopts    = "gentoo-ldflags";

       if ($config_static) {
         # link everything statically (this won't work due to libGL issues)

I don't know if or why that specific update was omitted in vmd-1.9.4-gentoo-paths.patch.

If you can sort it all out, perhaps the patches might make it upstream into the vmd-1.9.4 beta.
Comment 12 Pacho Ramos gentoo-dev 2020-09-14 10:15:33 UTC
(In reply to Hypoon from comment #11)
[...]
> @@ -2244,7 +2222,7 @@ if ($config_arch eq "LINUXAMD64") {
>        $arch_template_repository = "foobar";
>        $arch_shlibname   = "so";
>        $arch_shcppopts   = "-fPIC";
> -      $arch_shldopts    = "";
> +      $arch_shldopts    = "gentoo-ldflags";
> 
>        if ($config_static) {
>          # link everything statically (this won't work due to libGL issues)
> 
> I don't know if or why that specific update was omitted in
> vmd-1.9.4-gentoo-paths.patch.
> 


Because I couldn't find that section in updated configure file from 1.9.4a :/
Comment 13 Pacho Ramos gentoo-dev 2020-09-14 10:19:27 UTC
By the way, the concrete part of the patch that could help you with your parallel make issue could be
diff --git a/plugins/catdcd/Makefile b/plugins/catdcd/Makefile
index d6c58c5..1637a3c 100644
--- a/plugins/catdcd/Makefile
+++ b/plugins/catdcd/Makefile
@@ -45,8 +45,8 @@ ${ARCHDIR}/catdcd.exe : ${CATDCDOBJS} ${COMPILEDIR}/lib_${ARCH}/molfile/libmolfi
 	LINK ${CATDCDOBJS} /OUT:${ARCHDIR}/catdcd.exe /LIBPATH:${COMPILEDIR}/lib_${ARCH}/molfile libmolfile_plugin.lib ${TCLLIB} ${TCLLDFLAGS} ${NETCDFLIB} ${NETCDFLDFLAGS} ${EXPATLIB} ${EXPATLDFLAGS} ${SQLITELIB} ${SQLITELDFLAGS}
 
 # all other platforms
-${ARCHDIR}/catdcd : ${CATDCDOBJS} ${COMPILEDIR}/lib_${ARCH}/molfile/libmolfile_plugin.a
-	${CXX} ${CXXFLAGS} ${CATDCDOBJS} -o ${ARCHDIR}/catdcd -L${COMPILEDIR}/lib_${ARCH}/molfile -lmolfile_plugin ${TCLLIB} ${TCLLDFLAGS} ${NETCDFLIB} ${NETCDFLDFLAGS} ${EXPATLIB} ${EXPATLDFLAGS} ${SQLITELIB} ${SQLITELDFLAGS} -lm
+${ARCHDIR}/catdcd : ${CATDCDOBJS} ${COMPILEDIR}/lib_${ARCH}/molfile/libmolfile_plugin.a ${COMPILEDIR}/lib_${ARCH}/molfile/libmolfile_plugin.h
+	${CXX} ${LDFLAGS} ${CXXFLAGS} ${CATDCDOBJS} -o ${ARCHDIR}/catdcd -L${COMPILEDIR}/lib_${ARCH}/molfile -lmolfile_plugin ${TCLLIB} ${TCLLDFLAGS} ${NETCDFLIB} ${NETCDFLDFLAGS} ${EXPATLIB} ${EXPATLDFLAGS} ${SQLITELIB} ${SQLITELDFLAGS} -lm
 
 ${ARCHDIR}/hash.o: hash.h hash.c
 	${CXX} ${CXXFLAGS} ${INCDIR} -c ${SRCDIR}/hash.c $(COPTO)${ARCHDIR}/hash.o
diff --git a/plugins/cionize/Makefile b/plugins/cionize/Makefile
index bcb2510..e02241b 100644
--- a/plugins/cionize/Makefile
+++ b/plugins/cionize/Makefile
@@ -52,8 +52,8 @@ ${ARCHDIR}/cionize.exe : ${IONIZEOBJS} ${MGPOTOBJS} ${ARCHDIR}/cionize.o ${COMPI
 	LINK ${IONIZEOBJS} ${MGPOTOBJS} /OUT:${ARCHDIR}/cionize.exe /LIBPATH:${COMPILEDIR}/lib_${ARCH}/molfile libmolfile_plugin.lib ${TCLLIB} ${TCLLDFLAGS} ${NETCDFLIB} ${NETCDFLDFLAGS} ${EXPATLIB} ${EXPATLDFLAGS} ${SQLITELIB} ${SQLITELDFLAGS}
 
 # all other platforms
-${ARCHDIR}/cionize: ${IONIZEOBJS} ${MGPOTOBJS} ${ARCHDIR}/cionize.o ${COMPILEDIR}/lib_${ARCH}/molfile/libmolfile_plugin.a
-	${CXX} ${CXXFLAGS} ${ARCHDIR}/cionize.o ${IONIZEOBJS} ${MGPOTOBJS} -o ${ARCHDIR}/cionize -L${COMPILEDIR}/lib_${ARCH}/molfile -lmolfile_plugin ${TCLLIB} ${TCLLDFLAGS} ${NETCDFLIB} ${NETCDFLDFLAGS} ${EXPATLIB} ${EXPATLDFLAGS} ${SQLITELIB} ${SQLITELDFLAGS} -lm
+${ARCHDIR}/cionize: ${IONIZEOBJS} ${MGPOTOBJS} ${ARCHDIR}/cionize.o ${COMPILEDIR}/lib_${ARCH}/molfile/libmolfile_plugin.a  ${COMPILEDIR}/lib_${ARCH}/molfile/libmolfile_plugin.h
+	${CXX} ${LDFLAGS} ${CXXFLAGS} ${ARCHDIR}/cionize.o ${IONIZEOBJS} ${MGPOTOBJS} -o ${ARCHDIR}/cionize -L${COMPILEDIR}/lib_${ARCH}/molfile -lmolfile_plugin ${TCLLIB} ${TCLLDFLAGS} ${NETCDFLIB} ${NETCDFLDFLAGS} ${EXPATLIB} ${EXPATLDFLAGS} ${SQLITELIB} ${SQLITELDFLAGS} -lm
 
 ${ARCHDIR}/hash.o: hash.h hash.c
 	${CC}  ${CCFLAGS} ${INCDIR} -c ${SRCDIR}/hash.c $(COPTO)${ARCHDIR}/hash.o
@@ -66,7 +66,7 @@ ${ARCHDIR}/util.o: util.h util.c
 
 ${ARCHDIR}/getplugins.o: getplugins.h getplugins.c
 	${CC}  ${CCFLAGS} ${INCDIR} -c ${SRCDIR}/getplugins.c $(COPTO)${ARCHDIR}/getplugins.o
-	
+
 ${ARCHDIR}/energythr.o: energythr.h energythr.c ${ARCHDIR}/util.o ${ARCHDIR}/threads.o
 	${CC}  ${CCFLAGS} ${INCDIR} -c ${SRCDIR}/energythr.c $(COPTO)${ARCHDIR}/energythr.o
Comment 14 Hypoon 2020-09-15 02:14:32 UTC
(In reply to Pacho Ramos from comment #12)
> Because I couldn't find that section in updated configure file from 1.9.4a :/

I thought I saw that section in the 1.9.4 configure, I'll look again when I have an opportunity.

(In reply to Pacho Ramos from comment #13)
> By the way, the concrete part of the patch that could help you with your
> parallel make issue could be
> [...]

There's a different section of the patch that I thought also might be relevant to the parallel build issue. I'll find the exact portion when I get back to my machine, but I think it created a couple of new targets for the molfile libraries and assigned them as dependencies to existing targets ("bins" was one of them, I think). I could be mistaken, since I didn't look too closely. I just verified that it was patching something that was consistent between 1.9.3 and 1.9.4, and so I figured the patch was still useful.

Sorry for the vagueness, but I'll give more detailed information tomorrow.
Comment 15 Hypoon 2020-09-16 00:59:29 UTC
(In reply to Hypoon from comment #14)
> (In reply to Pacho Ramos from comment #12)
> > Because I couldn't find that section in updated configure file from 1.9.4a :/
> 
> I thought I saw that section in the 1.9.4 configure, I'll look again when I
> have an opportunity.

Nope, I was mistaken. Your guess (or lack thereof) is as good as mine.
 
> (In reply to Pacho Ramos from comment #13)
> > By the way, the concrete part of the patch that could help you with your
> > parallel make issue could be
> > [...]
> 
> There's a different section of the patch that I thought also might be
> relevant to the parallel build issue.

This patch solves my parallel build issue:

--- a/plugins/Makefile
+++ b/plugins/Makefile
@@ -173,7 +173,7 @@
 win32staticlibs: win32molfilelibs
        for dir in $(BUILDDIRS); do cd $$dir && $(MAKE) win32staticlibs && cd .. || exit 1 ; done

-bins:
+bins: molfilelibs
        for dir in molfile_plugin $(BUILDDIRS); do cd $$dir && $(MAKE) bins && cd .. || exit 1 ; done

 win32bins:



...which is a simplified version of some of the changes in the vmd-1.9.*-gentoo-plugins patches.


Also, while you're at it... for the current ebuild, the current directory is ${WORKDIR}/${MY_P} when xdg_src_prepare gets called, which in turn calls eapply_user. This means that it's impossible to apply user patches to any files in the plugins directory (as far as I can tell, anyway... perhaps I'm missing something). A quick solution is to surround the xdg_src_prepare invocation with directory changes:

cd ..
xdg_src_prepare
cd ${MY_P}

which seems to work, but I don't know if there are any undesirable side-effects.
Comment 16 Pacho Ramos gentoo-dev 2020-09-16 11:28:57 UTC
I will try to upstream the parallel build issue patch for now

Regarding the eapply_user... well... it's the same situation as with previous version right? VMD is using that strange way of splitting plugins from the main directory for a long time :/
Comment 17 Hypoon 2020-09-17 18:25:23 UTC
Yes, but I'm not suggesting changing anything about the directory structure. I'm just suggesting that one line (xdg_src_prepare) should be executed in ${WORKDIR} instead of ${WORKDIR}/${MY_P}. This is not a VMD change, it's a Gentoo ebuild change. It's the only way for users to be able to patch the plugins directory.
Comment 18 Larry the Git Cow gentoo-dev 2020-09-17 20:58:43 UTC
The bug has been referenced in the following commit(s):

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

commit 2b8ca2477464d99ddabb7c1da6df8138d44917e7
Author:     Pacho Ramos <pacho@gentoo.org>
AuthorDate: 2020-09-17 20:58:33 +0000
Commit:     Pacho Ramos <pacho@gentoo.org>
CommitDate: 2020-09-17 20:58:33 +0000

    sci-chemistry/vmd: Allow to apply user patches in plugins
    
    Bug: https://bugs.gentoo.org/show_bug.cgi?id=741978
    Package-Manager: Portage-3.0.7, Repoman-3.0.1
    Signed-off-by: Pacho Ramos <pacho@gentoo.org>

 sci-chemistry/vmd/vmd-1.9.4_alpha43.ebuild | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
Comment 19 Larry the Git Cow gentoo-dev 2020-09-24 14:46:30 UTC
The bug has been closed via the following commit(s):

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

commit 2176533fcbc07aabe6a5c9a45e6bb1e499773592
Author:     Pacho Ramos <pacho@gentoo.org>
AuthorDate: 2020-09-24 14:46:15 +0000
Commit:     Pacho Ramos <pacho@gentoo.org>
CommitDate: 2020-09-24 14:46:25 +0000

    sci-chemistry/vmd: Apply fixes to plugins
    
    Adapt patch to 1.9.4
    
    Closes: https://bugs.gentoo.org/741978
    Thanks-to: Hypoon
    Package-Manager: Portage-3.0.7, Repoman-3.0.1
    Signed-off-by: Pacho Ramos <pacho@gentoo.org>

 .../vmd/files/vmd-1.9.4-gentoo-plugins.patch       | 604 +++++++++++++++++++++
 sci-chemistry/vmd/vmd-1.9.4_alpha43.ebuild         |   6 +
 2 files changed, 610 insertions(+)