Ebuild for torch is marked x86 only. I'm evaluating this package at the moment on my amd64 workstation and have modified the ebuild so it builds, installs and can be linked against (and run, of course). Reproducible: Always Steps to Reproduce: Can be reproduced by running "emerge torch" on an amd64 system. Actual Results: Error on emerge is that package is masked. Expected Results: The software should have built Torch for amd64 architecture. The patch I used - which is probably really messy due to my poor understanding of ebuilds at the moment was: == Start of: diff -d /usr/portage/sci-libs/torch/torch-3.ebuild /etc/portage/sci-libs/torch/torch-3.ebuild == 14c14 < KEYWORDS="x86" --- > KEYWORDS="x86 ~amd64" 27,31c27,43 < sed -i \ < -e "s:^PACKAGES.*:PACKAGES = ${torch_packages}:" \ < -e "s:^DEBUG.*:DEBUG = ${shalldebug}:" \ < -e "s:^CFLAGS_OPT_FLOAT.*:CFLAGS_OPT_FLOAT = -Wall ${CFLAGS} -ffast-math -malign-double:" \ < Makefile_options_Linux --- > if ( echo $KEYWORDS | grep -i amd64 ) then > sed -i \ > -e "s:^PACKAGES.*:PACKAGES = ${torch_packages}:" \ > -e "s:^DEBUG.*:DEBUG = ${shalldebug}:" \ > -e "s:^CFLAGS_OPT_FLOAT.*:CFLAGS_OPT_FLOAT = -Wall ${CFLAGS} -ffast-math" \ > Makefile_options_Linux > sed -i -e 's| -malign-double||' -e 's| -mcpu=i686||' -e 's|march=i686|march=k8|' config/Makefile_options_g++ > sed -i -e 's| -malign-double||' -e 's| -mcpu=i686||' -e 's|march=i686|march=k8|' config/Makefile_options_Linux > sed -i -e 's| -malign-double||' -e 's| -mcpu=i686||' -e 's|march=i686|march=k8|' Makefile_options_Linux > else > sed -i \ > -e "s:^PACKAGES.*:PACKAGES = ${torch_packages}:" \ > -e "s:^DEBUG.*:DEBUG = ${shalldebug}:" \ > -e "s:^CFLAGS_OPT_FLOAT.*:CFLAGS_OPT_FLOAT = -Wall ${CFLAGS} -ffast-math -malign-double:" \ > Makefile_options_Linux > > fi == End of Patch == Moving the torch e-build to /etc/portage/sci-libs and applying this patch allows the package to be built and installed. As it's a first go I left it marked as "~amd64" and not "amd64". As you can see all it does is change the "-march" within the makefiles and removes the "-mcpu" and "-malign-double" flags. Torch then builds and installs. PS: Let me know if this isn't where to submit these things - there are a couple of other packages I'm working on here that I may submit if anyone's interested (them being ghmm for Hidden Markov Modelling and xmlio which is a dependency for ghmm).
Gorden: Would you be so nice and _attach_ a unified diff, please!?
Created attachment 52647 [details, diff] Ebuild patch for Torch on amd64 Thanks Carlo - that was what I needed to know (like I said - I've never tried to submit things like this before). I trust I've done this right then - I did: diff -d -u /usr/portage/sci-libs/torch/torch-3.ebuild /etc/portage/sci-libs/torch/torch-3.ebuild > torch-amd64-patch ...and have attached the resulting file.
Cleaner patch applied, ~amd64 keyword added. Thanks!