You are not logged in.

#1 2021-05-24 15:01:52

AlienX
Member
Registered: 2021-05-24
Posts: 1

Help needed in installing a AUR package

I am trying to install a 2D plotting software called grace from AUR packages (https://aur.archlinux.org/packages/grace/). I cloned everything and tried to install it with

makepkg -si

and got the following errors

utils.c: In function ‘stufftext’:
utils.c:1174:9: error: format not a string literal and no format arguments [-Werror=format-security]
 1174 |         printf(s);
      |         ^~~~~~
utils.c:1179:9: error: format not a string literal and no format arguments [-Werror=format-security]
 1179 |         fprintf(resfp, s);
      |         ^~~~~~~
utils.c: In function ‘lock_dirtystate’:
utils.c:1392:6: warning: type of ‘flag’ defaults to ‘int’ [-Wimplicit-int]
 1392 | void lock_dirtystate(flag)
      |      ^~~~~~~~~~~~~~~
utils.c: In function ‘set_workingdir’:
utils.c:1225:9: warning: ignoring return value of ‘getcwd’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
 1225 |         getcwd(workingdir, GR_MAXPATHLEN - 1);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
make[1]: *** [<builtin>: utils.o] Error 1
make[1]: Leaving directory '/var/cache/private/pamac/grace/src/grace-5.1.25/src'
make: *** [Makefile:10: subdirs] Error 1
==> ERROR: A failure occurred in build().

Offline

#2 2021-05-24 15:10:40

Khere
Member
From: Italy
Registered: 2020-03-04
Posts: 170

Re: Help needed in installing a AUR package

Use yay to install it and see if it work.


Fan of Giorgio Moroder & Mohammad Ammax enemy

Offline

#3 2021-05-24 15:21:32

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,694

Re: Help needed in installing a AUR package

Khere wrote:

Use yay to install it and see if it work.

I think it unlikely.  Those errors look real.  My guess is that the option format-security is being enforced by the compiler, and that is probably new since the code was written,
I am not an expert at configuring make systems, but I think those warnings that are being treated as errors need to be fixed, or the flag that says to treat those warnings as errors needs to be disabled.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

#4 2021-05-24 15:26:29

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: Help needed in installing a AUR package

Khere wrote:

Use yay to install it and see if it work.

Terrible advice. Yay uses makepkg under the hood, if makepkg doesn't work then there is no chance that yay will.


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#5 2021-05-24 15:33:56

loqs
Member
Registered: 2014-03-06
Posts: 19,013

Re: Help needed in installing a AUR package

Fixed by applying https://sources.debian.org/patches/grac … ning.diff/
Edit:

git diff
diff --git a/PKGBUILD b/PKGBUILD
index c7cb5a7..82168ee 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -13,15 +13,21 @@ depends=('libjpeg' 'libpng' 'openmotif' 't1lib' 'netcdf' 'fftw')
 license=('GPL')
 options=('staticlibs')
 source=("ftp://ftp.fu-berlin.de/unix/graphics/grace/src/grace5/$pkgname-$pkgver.tar.gz"
-        "grace-fftw3.patch")
+        "grace-fftw3.patch"
+        https://sources.debian.org/data/main/g/grace/1:5.1.25-6/debian/patches/source-hardening.diff
+        https://sources.debian.org/data/main/g/grace/1:5.1.25-6/debian/patches/t1lib-general.diff)
 sha512sums=('9ea68483af1dfc98d217ae730b7a51b66deae5aaa8dfda29d5a3337ed4b5728b45aa03f561bf7d4173e73d6af8dee03cbabd95c0c8dd36999303c89451a3728a'
-            '6d9190a1a51bd411e067bd02910e60b3612df48bee2002d5f33c97ecca38bbc5d79538e73b2e743eda234f2921fe59ebfd855efe56097c3692a72593ddd10611')
+            '6d9190a1a51bd411e067bd02910e60b3612df48bee2002d5f33c97ecca38bbc5d79538e73b2e743eda234f2921fe59ebfd855efe56097c3692a72593ddd10611'
+            'd9bc22f67771061d7f4d5555dc57056eadadfff50169f525d2b87cab36dc1fcc8a7a3d88f685ffe3eb5b5140a25061efa3be08331dd44de2d55bba720a6166e7'
+            '9404eb04365ad97cf752708028740f65fc8886e926ae73f5c00b8b3e09ca03f6a1f0b76778eb2405182e07803c19d37aa8ad562d53db2cc16ad9d4fd806b6537')
 
 prepare() {
   cd "$pkgname-$pkgver"
   sed -i '1,1i#include <zlib.h>' src/rstdrv.c
   sed -i 's|png_ptr->jmpbuf|png_jmpbuf(png_ptr)|g' src/rstdrv.c
   patch -p1 -i ../grace-fftw3.patch # port to FFTW3 (Debian)
+  patch -p1 -i ../source-hardening.diff
+  patch -p1 -i ../t1lib-general.diff
 }
 
 build() {

Also added t1lib-general.diff which includes fixes for CVE-2010-2642, CVE-2011-1552,CVE-2011-1552-1553, and CVE-2011-1552-1554.

Last edited by loqs (2021-05-24 15:45:55)

Offline

Board footer

Powered by FluxBB