You are not logged in.
cmake .. \
-DCMAKE_INSTALL_PREFIX=/usr \
So files are not placed in /usr/local you can then stop creating "${pkgdir}"/usr/bin have a look at other packages that list cmake as a makedepends
git config submodule.abc.url "${srcdir}"/abc-ufo
Why do this in package?
The makedepends and depends need checking.
Edit:
makepkg#WARNING:_Package_contains_reference_to_.24srcdir
Edit2:
Makepkg#CFLAGS.2FCXXFLAGS.2FLDFLAGS_in_makepkg.conf_do_not_work_for_CMake_based_packages appears outdated so build can be simplified to
build() {
cd "${_gitname}"
mkdir -p build
cd build
CXXFLAGS+=" -Wno-narrowing"
cmake \
-DCMAKE_INSTALL_PREFIX=/usr \
..
make
}
Last edited by loqs (2018-06-16 11:47:47)
Offline
How do I go around the warning "Package contains reference to $srcdir" ?
[phung@archlinux avy]$ grep -R "$(pwd)/src" pkg/
Binary file pkg/extavy-git/usr/lib/libabc.a matches
Binary file pkg/extavy-git/usr/lib/libglucose.a matches
Binary file pkg/extavy-git/usr/lib/libminisat.a matches
Binary file pkg/extavy-git/usr/bin/glucose_core matches
Binary file pkg/extavy-git/usr/bin/minisat_core matches
Binary file pkg/extavy-git/usr/bin/minisat matches
Binary file pkg/extavy-git/usr/bin/glucose matches
[phung@archlinux avy]$
# Maintainer: promach
_gitname=extavy
pkgname=${_gitname}-git
pkgver=r17.c75c833
pkgrel=1
pkgdesc="Avy logic verifier"
arch=('x86_64')
url="https://bitbucket.org/arieg/extavy.git"
license=('GPL')
depends=()
makedepends=('boost')
source=("git+https://bitbucket.org/arieg/extavy.git"
"git+https://bitbucket.org/arieg/abc-ufo.git"
"git+https://bitbucket.org/arieg/avy.git"
"git+https://bitbucket.org/arieg/glucose.git"
"git+https://bitbucket.org/arieg/minisat.git");
md5sums=('SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP')
pkgver() {
cd "${_gitname}"
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
prepare() {
cd "${_gitname}"
git submodule init
git config submodule.abc.url "${srcdir}"/abc-ufo
git config submodule.minisat.url "${srcdir}"/minisat
git config submodule.glucose.url "${srcdir}"/glucose
git config submodule.avy.url "${srcdir}"/avy
git submodule update
}
build() {
cd "${_gitname}"
mkdir -p build
cd build
CXXFLAGS+=" -Wno-narrowing"
cmake \
-DCMAKE_INSTALL_PREFIX=/usr \
..
make
}
package() {
cd "${_gitname}/build"
make DESTDIR="${pkgdir}" install
}
Offline
The warnings are coming from binaries which have recorded the location I would ignore the warning as unavoidable.
Offline
would ignore the warning as unavoidable.
What do you exactly mean by ignoring the warning ?
This warning implies actual runtime problem for users.
Please correct me if I am wrong.
Offline
See my first link from post #26
Offline
/home/phung/Downloads/avy/src/extavy/abc/src/aig/gia/giaIso.c:61:1: error: narrowing conversion of ‘2555079385’ from ‘unsigned int’ to ‘int’ inside { } [-Wnarrowing]
Is this the compilation failure/error that you faced as well ? If yes, I might need to email extavy code author about this particular error.
As for the declare, I was told by someone to do so in #archlinux IRC forum. Anything wrong with the syntax in my PKGBUILD ?
No they didn't. You posted a PKGBUILD there which used commas to separate array elements, which is invalid bash. You were told to execute
mds5ums=('SKIP','SKIP','SKIP','SKIP','SKIP'); declare -p md5sums
in an interactive shell, *not* in the PKGBUILD, in order to see what the commas actually do. I'm not sure why you decided to put the declare in your PKGBUILD after that.
would ignore the warning as unavoidable.
What do you exactly mean by ignoring the warning ?
This warning implies actual runtime problem for users.
Please correct me if I am wrong.
Warnings are not errors, due to the fact that if they were errors they would be called errors.
As loqs already said, the binaries run just fine. If you're not involved in reproducible builds then there's much bigger issues in life than whether your package builds reproducibly, though if you could convince upstream to fix this it would be nice I guess.
Managing AUR repos The Right Way -- aurpublish (now a standalone tool)
Offline
As loqs already said, the binaries run just fine.
I have installed the pacman package I created using my own PKGBUILD for extavy-git.
However, "avy" or "extavy" are not any usable terminal commands to trigger anything to happen. This means the binaries are not within the executable path of terminal.
Therefore, the warnings really serve as something to be solved in order to build binaries that could be run correctly not just by myself, also other people.
Could anyone advise ?
Last edited by promach (2018-06-17 14:54:01)
Offline
The "package contains reference to $srcdir" warning should make you investigate the reason. It looks like this project includes debug/error messages, that reference the source file with __FILE__. That does not cause problems.
However, "avy" or "extavy" are not any usable terminal commands to trigger anything to happen. This means the binaries are not within the executable path of terminal.
How did you get that idea? You have to install the package with pacman first, then the binaries will be in /usr/bin. A nonexistent command should trigger an error message. If seemingly nothing happens, then the command was executed, but it did not show any messages.
$ FAKECOMMAND
bash: FAKECOMMAND: command not found
Edit: If the package does not contain any avy or extavy command, then this is another issue. Either they have another name, something went wrong with the build or the install command doesn't copy it for some reason. The srcdir reference should not matter here.
Last edited by progandy (2018-06-17 15:18:58)
| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |
Offline
PKGBUILD package() contained
mkdir "${pkgdir}"/usr/bin
cp avy/src/{avy,avybmc} "${pkgdir}"/usr/bin
cmake .. \ -DCMAKE_INSTALL_PREFIX=/usr \
So files are not placed in /usr/local you can then stop creating "${pkgdir}"/usr/bin have a look at other packages that list cmake as a makedepends
You deleted the cp as well as mkdir that would not explain extavy however.
Edit:
pacman -Qlp extavy-git-r17.c75c833-1-x86_64.pkg.tar.xz | grep /usr/bin
extavy-git /usr/bin/
extavy-git /usr/bin/glucose
extavy-git /usr/bin/glucose_core
extavy-git /usr/bin/minisat
extavy-git /usr/bin/minisat_core
Last edited by loqs (2018-06-17 15:26:12)
Offline
mkdir: cannot create directory ‘/home/phung/Downloads/avy/pkg/extavy-git/usr/bin’: File exists
==> ERROR: A failure occurred in package().
Aborting...
[phung@archlinux avy]$
So, the cp and mkdir will not help.
So, the "package contains reference to $srcdir" warning is due to some other bug.
Last edited by promach (2018-06-17 16:33:40)
Offline
mkdir: cannot create directory ‘/home/phung/Downloads/avy/pkg/extavy-git/usr/bin’: File exists
==> ERROR: A failure occurred in package().
Aborting...
[phung@archlinux avy]$So, the cp and mkdir will not help.
I do not see how you conclude that cp will not help from the above you why you used mkdir after the previous comments.
[
So, the "package contains reference to $srcdir" warning is due to some other bug.
This is now been explained by three different posters but you seem to just want to have the message not appear rather than understand what it indicates and when it can be significant.
Offline
Been updating the one for symbiyosys-git:
# Maintainer promach
_gitname=SymbiYosys
pkgname="$(echo -n ${_gitname}|tr A-Z a-z)-git"
pkgver=r127.e90bcb5
pkgrel=1
pkgdesc="A front-end driver program for Yosys-based formal hardware verification flows"
arch=('x86_64')
url="https://github.com/YosysHQ/${_gitname}.git"
license=('custom:ISC')
depends=('yosys')
makedepends=()
source=("git+https://github.com/YosysHQ/${_gitname}.git")
sha512sums=('SKIP')
pkgver(){
cd "${_gitname}"
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
package(){
cd "${_gitname}"
make PREFIX=/usr DESTDIR="$pkgdir" install
}
If noone complains I could add it to aur.
Offline
Been updating the one for symbiyosys-git:
# Maintainer promach _gitname=SymbiYosys pkgname="$(echo -n ${_gitname}|tr A-Z a-z)-git"
Super complicated, bash has this builtin -- just use
${gitname,,}
Also note that GitHub will allow you to use any case to access a repository, so you can just treat the url as case-insensitive.
pkgver=r127.e90bcb5 pkgrel=1 pkgdesc="A front-end driver program for Yosys-based formal hardware verification flows" arch=('x86_64')
This does not contain x86_64 compiled ELF binaries, so use 'any' instead.
url="https://github.com/YosysHQ/${_gitname}.git" license=('custom:ISC') depends=('yosys') makedepends=()
Remove empty arrays.
source=("git+https://github.com/YosysHQ/${_gitname}.git") sha512sums=('SKIP') pkgver(){ cd "${_gitname}" printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" } package(){ cd "${_gitname}" make PREFIX=/usr DESTDIR="$pkgdir" install }
If noone complains I could add it to aur.
Other than that it looks fine.
Managing AUR repos The Right Way -- aurpublish (now a standalone tool)
Offline
Thanks for the feedback. I just pushed the package to aur.
Offline