Hey!
I ran into the same problem as you, hellgast. I guessed scrypt140202.cl was now called scrypt.cl. I changed its name back while building vertminer and it installed fine. But I can't launch vertminer now; every time I start it, it just quits instantanously without printing anything in the terminal. I can't figure out why. Maybe its not the name that has changed after all. Any ideas?
Search Criteria
Package Details: vertminer-gpu 3.7.2-4
Package Actions
| Package Base: | vertminer-gpu |
|---|---|
| Description: | AMD GPU miner for scrypt-N-based coins, like vertcoin and pandacoin. |
| Upstream URL: | http://vertcoin.org |
| Category: | science |
| Licenses: | |
| Submitter: | Nilux |
| Maintainer: | None |
| Last Packager: | None |
| Votes: | 0 |
| First Submitted: | 2014-02-18 10:42 |
| Last Updated: | 2014-03-20 11:00 |
Latest Comments
Comment by Oettam
Comment by hellgast
cannot build:
make[2]: Vstupuje se do adresáře „/tmp/yaourt-tmp-psendahans/aur-vertminer-gpu/src/vertminer-gpu“
CC vertminer-vertminer.o
CC vertminer-util.o
CC vertminer-sha2.o
CC vertminer-api.o
CC vertminer-logging.o
CC vertminer-driver-opencl.o
CC vertminer-ocl.o
CC vertminer-findnonce.o
CC vertminer-adl.o
CC vertminer-scrypt.o
CCLD vertminer
make[2]: *** Žádné pravidlo jak vyrobit cíl „scrypt140202.cl“ potřebný pro „all-am“. Konec.
make[2]: Opouští se adresář „/tmp/yaourt-tmp-psendahans/aur-vertminer-gpu/src/vertminer-gpu“
Makefile:1168: návod pro cíl „all-recursive“ selhal
make[1]: *** [all-recursive] Chyba 1
make[1]: Opouští se adresář „/tmp/yaourt-tmp-psendahans/aur-vertminer-gpu/src/vertminer-gpu“
Makefile:643: návod pro cíl „all“ selhal
make: *** [all] Chyba 2
==> CHYBA: Došlo k chybě v build().
Rušení...
==> ERROR: Makepkg was unable to build vertminer-gpu.
Comment by virtuemood
it won't compile without built-in jansson 2.5.
As a result, I comment out all sed/mv stuffs.
Comment by Nilux
if using yaourt, you can also
"cp ADL/ADL_SDK_6.0.zip /tmp/yaourt-tmp-marko/aur-vertminer-gpu/"
or
wherever makepkg build your packages
Comment by mgd
Don't think that's easily possible. If I understand the included license agreement we'd at least be required to handle agreement to the AMD license during package installation. Haven't checked whether we'd be allowed to distribute the ADL_SDK in the first place anyway.
Is it really too much effort to do these in a shell:
tar xzf package.tar.gz
cd package
ln -s <path-to-ADL_SDK> ADL_SDK
makepkg
Just asking.
Note we are talking about AUR packages, not regular repositories.
Comment by ETNyx
There is another thing, is it possible to somehow include ADL_SDK? Programs like yaourt will fail on attempt to install, at this time.
Comment by Nilux
Fixed. Thanks for the help!
BTW should I change the name to vertminer-git, because it downloads the current version anyway? Then I should also get the git-version-line to work:
pkgver() {
cd "$srcdir/$_gitname"
echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}
and remove the static version number 3.7.2.
Can someone figure out how it works?
Comment by mgd
Correct - I suppose this is from linebreaks in the browser.
ETNyx is right. the 2 unzip commands in prepare are spread over 2 lines when both should be on one line and the 2 sed commands are spread across 3 lines when both should be a single line as well.
Is there a way to append (small) files to these comments so that things like linebreaks won't break stuff in the future ?
Comment by ETNyx
At this point is PKGBUILD wrong, for some reasone you did breakline in some parts where doesnt belong. After manual fix its compilable and looks alright.
section prepare() { -> 2 times unzip
section build() { -> 2 times sed
Comment by Nilux
Thanks! I added the changes you worked out, but haven't had the possibility to test it yet.
I also added your name to PKGBUILD
Comment by mgd
Meanwhile I've read through the wiki documentation on creating packages etc. and prepared a simple patch. I then had a look at cgminer-gpu-adl.
I think most of what happens in cgminer-gpu-adl is not needed for vertminer-gpu and thus I'll follow the advice from the arch wiki to make use of sed instead of a full blown patch when there are just one or two line to change.
However there are all the *.cl (OpenCL code) files included in the created package, some of which collidate with equal files from cgminer-gpu. Luckily only scrypt140202.cl is used by vertminer-gpu. Therefor this is the only one I include in the package.
Plese note as well that I moved "jansson" from 'conflicts' to 'depends'.
Find below the PKGBUILD that worked for me:
# Maintainer: Nilux <marko at paasila dot net>
pkgname=vertminer-gpu
pkgver=.
pkgver() {
cd "$srcdir/$_gitname"
echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}
pkgrel=1
pkgdesc="AMD GPU miner for scrypt-N-based coins, like vertcoin and pandacoin."
arch=("i686" "x86_64")
url=("http://vertcoin.org")
license=("GPL3")
depends=("ncurses" "curl" "libcl" "jansson")
conflicts=("vertminer" "vertminer-gpu" "vertminer-git")
makedepends=('opencl-headers' 'git' 'amdapp-sdk' 'unzip')
optdepends=()
provides=("vertminer-gpu")
source=("git+https://github.com/Bufius/vertminer-gpu.git"
"ADL_SDK_6.0.zip"
)
sha512sums=('SKIP'
'4af430f0a0eac347b0e3df39999abbf7a4281a1b01398845fd8e826b69c28b67fc062092eac0ef207ace943006ed4ccd8c6017049c2dfd3945914ea6153026f3'
)
noextract=('ADL_SDK_6.0.zip')
[ "$CARCH" == "x86_64" ] && makedepends+=('yasm')
prepare() {
unzip -jod "$srcdir/$pkgname/ADL_SDK/" "$srcdir/ADL_SDK_6.0.zip" "include/*.h"
unzip -od "$srcdir/AMD_ADL_SDK" "$srcdir/ADL_SDK_6.0.zip" "Public-Documents/ADL*"
}
#pkgver() {
# cd "$srcdir/$pkgname"
# # Use the tag of the last commit
# git describe --long | sed -E 's/([^-]*-g)/r\1/;s/-/./g'
#}
build() {
cd "$srcdir/$pkgname"
# do not use included jansson-2.5 but already installed package
mv configure.ac configure.ac.orig
sed -e 's/AC_CONFIG_SUBDIRS(\[compat\/jansson-2.5\])//' -e 's/JANSSON_LIBS="compat\/jansson-2.5\/src\/.libs\/libjansson.a"/JANSSON_LIBS="-ljansson"/' <configure.ac.orig >configure.ac
mv Makefile.am Makefile.am.orig
sed -e 's/^JANSSON_INCLUDES/#JANSSON_INCLUDES/' -e 's/bin_SCRIPTS\t= \$(top_srcdir)\/\*.cl/bin_SCRIPTS\t= \$(top_srcdir)\/scrypt140202.cl/' <Makefile.am.orig >Makefile.am
pushd compat
mv Makefile.am Makefile.am.orig
sed -e 's/jansson-2.5//' <Makefile.am.orig >Makefile.am
popd
./autogen.sh
./configure \
--prefix=/usr \
--enable-scrypt \
--enable-opencl \
make
}
package() {
cd "$srcdir/$pkgname"
make DESTDIR="$pkgdir" install
}
Comment by Nilux
And let me know if you want to adopt this PKGBUILD, as you seem to be more knowledgeable than me.
Comment by Nilux
@mgd I think you can put the patches into the build directory. But then you have to alter the PKGBUILD to use them. Have a look at https://aur.archlinux.org/packages/cgminer-gpu-adl/. He has patched jansson in the PKGBUILD.
Comment by mgd
I got it working by manually applying the following patches to some files inside src/vertminer-gpu and then run autogen.sh there:
--- configure.ac.orig 2014-03-17 19:16:40.470942882 +0100
+++ configure.ac 2014-03-18 22:02:08.320527074 +0100
@@ -392,8 +392,7 @@
AM_CONDITIONAL([WANT_STATIC_LIBUSB], [test x$dlibusb = xno])
-AC_CONFIG_SUBDIRS([compat/jansson-2.5])
-JANSSON_LIBS="compat/jansson-2.5/src/.libs/libjansson.a"
+JANSSON_LIBS="-ljansson"
PKG_PROG_PKG_CONFIG()
--- Makefile.in.orig 2014-03-18 21:57:22.719230165 +0100
+++ Makefile.in 2014-03-18 22:00:58.433472632 +0100
@@ -602,8 +602,9 @@
top_srcdir = @top_srcdir@
version_info = @version_info@
ACLOCAL_AMFLAGS = -I m4
-JANSSON_INCLUDES = -I$(top_builddir)/compat/jansson-2.5/src -I$(top_srcdir)/compat/jansson-2.5/src
@WANT_USBUTILS_FALSE@USBUTILS_INCLUDES =
+
+#JANSSON_INCLUDES= -I$(top_builddir)/compat/jansson-2.5/src -I$(top_srcdir)/compat/jansson-2.5/src
@WANT_USBUTILS_TRUE@USBUTILS_INCLUDES = -I$(top_builddir)/compat/libusb-1.0/libusb -I$(top_srcdir)/compat/libusb-1.0/libusb
EXTRA_DIST = example.conf m4/gnulib-cache.m4 linux-usb-cgminer \
ADL_SDK/readme.txt api-example.php miner.php \
--- Makefile.am.orig 2014-03-17 19:16:40.440944151 +0100
+++ Makefile.am 2014-03-18 21:57:53.977912916 +0100
@@ -1,7 +1,7 @@
ACLOCAL_AMFLAGS = -I m4
-JANSSON_INCLUDES= -I$(top_builddir)/compat/jansson-2.5/src -I$(top_srcdir)/compat/jansson-2.5/src
+#JANSSON_INCLUDES= -I$(top_builddir)/compat/jansson-2.5/src -I$(top_srcdir)/compat/jansson-2.5/src
if WANT_USBUTILS
USBUTILS_INCLUDES = -I$(top_builddir)/compat/libusb-1.0/libusb -I$(top_srcdir)/compat/libusb-1.0/libusb
The resulting vertminer-gpu executable is then linked against the locally installed jansson-2.5 package.
Unfortunately I'm very new to arch linux and am just starting to learn how to handle PKGBUILD files. In an RPM based system I would just create 3 patchfiles (as above) and apply them to the files retrieved from git right before the build and be done with it.
Anyone knowledgeable wanting to do that ?
Or someone provide a quick pointer ?
I'll eventually read my way through the package builder documentation...
Comment by Nilux
Yea I noticed it too, but I'm just a cabinet maker and still don't understand how this is supposed to work. I'm sorry. It looks to me like jansson is included in the source of these cgminers, and I have no idea how to remove them || what to remove. If you find out, I'll include the fix in the PKGBUILD
Comment by mgd
This packages currently includes jansson-2.5 and thus directly conflicts with the jansson-2.5 package which in turn results in this not being installable in parallel with bfgminer and cgminer-gpu.
Would it (easily) be possible to remove jansson-2.5 from this package and make use of an already installed jansson-2.5 ?