Package Details: gpib-utils 1.5-4

Git Clone URL: https://aur.archlinux.org/gpib-utils.git (read-only, click to copy)
Package Base: gpib-utils
Description: GPIB instrument support utilities
Upstream URL: https://github.com/garlick/gpib-utils
Licenses: GPLv2
Submitter: greyltc
Maintainer: greyltc
Last Packager: greyltc
Votes: 0
Popularity: 0.000000
First Submitted: 2015-04-20 12:45 (UTC)
Last Updated: 2019-01-12 12:26 (UTC)

Latest Comments

dreieck commented on 2025-04-29 11:48 (UTC)

A working and fixed package now is gpib-utils-git.

You can draw inspirations from there on how to fix this one.

Regards!

dreieck commented on 2025-04-29 11:39 (UTC)

Please add backup=("etc/gpib-utils.conf") so that user made configuration changes do not get overwritten.

dreieck commented on 2025-04-29 11:37 (UTC)

LDFLAGS+=" -ltirpc"; export LDFLAGS is needed to work around this linking issue.

dreieck commented on 2025-04-29 11:11 (UTC)

You also need to add libtirpc to the depends array: That one provides /usr/include/tirpc/ and rpc/rpc.h.

dreieck commented on 2025-04-29 11:05 (UTC) (edited on 2025-04-29 11:18 (UTC) by dreieck)

After applying this fixes, build fails while linking due to missing symbols -- also happens if I add options+=('!lto') to the PKGBUILD. Compiling with make -j1 to avoid parallel builds:

/bin/sh ../libtool  --tag=CC   --mode=link gcc -Wall -Werror -march=native -mtune=native -O3 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -fstack-clash-protection -fcf-protection -w -Wno-error=parentheses -Wno-error=pointer-compare -Wno-error=stringop-truncation   -o hp6632 hp6632.o util.o gpib.o hpcrc.o ../libvxi11/libvxi11.la ../libics/libics.a ../liblsd/liblsd.a  -lm 
libtool: link: gcc -Wall -Werror -march=native -mtune=native -O3 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -fstack-clash-protection -fcf-protection -w -Wno-error=parentheses -Wno-error=pointer-compare -Wno-error=stringop-truncation -o .libs/hp6632 hp6632.o util.o gpib.o hpcrc.o  ../libvxi11/.libs/libvxi11.so ../libics/libics.a ../liblsd/liblsd.a -lm -Wl,-rpath -Wl,/var/cache/makepkg/build/gpib-utils/pkg/gpib-utils/usr/lib
/usr/bin/ld: ../libvxi11/.libs/libvxi11.so: undefined reference to `xdr_bool'
/usr/bin/ld: ../libvxi11/.libs/libvxi11.so: undefined reference to `xdr_string'
/usr/bin/ld: ../libvxi11/.libs/libvxi11.so: undefined reference to `clnt_spcreateerror'
/usr/bin/ld: ../libvxi11/.libs/libvxi11.so: undefined reference to `xdr_enum'
/usr/bin/ld: ../libvxi11/.libs/libvxi11.so: undefined reference to `xdr_u_short'
/usr/bin/ld: ../libvxi11/.libs/libvxi11.so: undefined reference to `clnt_create'
/usr/bin/ld: ../libvxi11/.libs/libvxi11.so: undefined reference to `clnttcp_create'
/usr/bin/ld: ../libvxi11/.libs/libvxi11.so: undefined reference to `xdr_char'
/usr/bin/ld: ../libvxi11/.libs/libvxi11.so: undefined reference to `xdr_void'
/usr/bin/ld: ../libvxi11/.libs/libvxi11.so: undefined reference to `xdr_u_long'
/usr/bin/ld: ../libvxi11/.libs/libvxi11.so: undefined reference to `xdr_u_char'
/usr/bin/ld: ../libvxi11/.libs/libvxi11.so: undefined reference to `xdr_long'
/usr/bin/ld: ../libvxi11/.libs/libvxi11.so: undefined reference to `xdr_bytes'
/usr/bin/ld: ../libvxi11/.libs/libvxi11.so: undefined reference to `clnt_sperror'
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:614: hp6632] Error 1
make[1]: Leaving directory '/var/cache/makepkg/build/gpib-utils/src/gpib-utils-1.5/src'
make: *** [Makefile:444: all-recursive] Error 1
==> ERROR: A failure occurred in build().

Here I have no further clue how to solve that.
Created an issue report upstream ↗ here.

Regards!

dreieck commented on 2025-04-29 10:57 (UTC)

Ahoj,

you need to add -Wno-error=parentheses -Wno-error=pointer-compare -Wno-error=stringop-truncation to $CFLAGS/ $CXXFLAGS to work around warnings trated as errors with GCC 14:

list.c: In function ‘list_create’:
list.c:229:12: error: suggest parentheses around assignment used as truth value [-Werror=parentheses]
  229 |     assert(l->magic = LIST_MAGIC);      /* set magic via assert abuse */
      |            ^
[...]
hostlist.c: In function ‘_next_tok’:
hostlist.c:384:48: error: comparison between pointer and zero character constant [-Werror=pointer-compare]
  384 |     while (**str != '\0' && strchr(sep, **str) != '\0')
      |                                    
[...]
hostlist.c: In function ‘_hostlist_create_bracketed.constprop’:
hostlist.c:1455:9: error: ‘strncpy’ specified bound 1024 equals destination size [-Werror=stringop-truncation]
 1455 |         strncpy(cur_tok, tok, 1024);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[1]: *** [Makefile:416: hostlist.o] Error 1
[...]

Here is a patch to the PKGBUILD which addresses this and the previous issue:

--- PKGBUILD.orig   2025-04-29 12:45:11.319996369 +0200
+++ PKGBUILD    2025-04-29 12:55:40.826600829 +0200
@@ -4,3 +4,3 @@
 pkgver=1.5
-pkgrel=4
+pkgrel=5
 pkgdesc="GPIB instrument support utilities"
@@ -10,2 +10,3 @@
 depends=('linux-gpib')
+makedepends=('rpcsvc-proto')
 source=("https://github.com/garlick/${pkgname}/archive/${pkgver}.tar.gz")
@@ -13,4 +14,10 @@

+_CFLAGSADDITIONS="-Wno-error=parentheses -Wno-error=pointer-compare -Wno-error=stringop-truncation"
+CFLAGS+=" ${_CFLAGSADDITIONS}"
+CXXFLAGS+=" ${_CFLAGSADDITIONS}"
+
 prepare() {
   cd "${srcdir}/${pkgname}-${pkgver}"
+  export CFLAGS
+  export CXXFLAGS
   ./autogen.sh

Regards and thanks for maintaining!

dreieck commented on 2025-04-29 10:45 (UTC)

You need to add makedepends=("rpcsvc-proto") because the rpcgen executable is needed:

==> Starting build()...
Making all in libvxi11
make[1]: Entering directory '/var/cache/makepkg/build/gpib-utils/src/gpib-utils-1.5/libvxi11'
rm -f vxi11intr.h; rpcgen -o vxi11intr.h -h vxi11intr.x
rm -f vxi11.h; rpcgen -o vxi11.h -h vxi11.x
/bin/sh ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I../config   -I/usr/include/tirpc -Wall -Wno-unused -g -O2 -MT rpccache.lo -MD -MP -MF .deps/rpccache.Tpo -c -o rpccache.lo rpccache.c
/bin/sh: line 1: rpcgen: command not found
/bin/sh: line 1: rpcgen: command not found
make[1]: *** [Makefile:824: vxi11intr.h] Error 127
[...]

Regards and thanks for this package!

mox commented on 2018-06-07 22:31 (UTC)

Does not build anymore, because rpc/rpc.h is missing.