Package Details: picosat 965-4

Git Clone URL: https://aur.archlinux.org/picosat.git (read-only, click to copy)
Package Base: picosat
Description: The PicoSAT solver
Upstream URL: http://fmv.jku.at/picosat/
Licenses: MIT
Submitter: reflectionalist
Maintainer: lorcap
Last Packager: lorcap
Votes: 2
Popularity: 0.000000
First Submitted: 2012-02-23 10:46 (UTC)
Last Updated: 2024-11-23 08:09 (UTC)

Dependencies (0)

Required by (0)

Sources (2)

Latest Comments

maksverver commented on 2024-11-22 15:10 (UTC) (edited on 2024-11-22 15:10 (UTC) by maksverver)

For me this PKGBUILD fails when using LTO and parallel make, with errors like this:

/usr/bin/ld: /tmp/ccZUiKzH.ltrans0.ltrans.o: in function `main':
<artificial>:(.text.startup+0x40a): undefined reference to `picosat_init'
..
collect2: error: ld returned 1 exit status
make: *** [makefile:19: picomcs] Error 1
make: *** Waiting for unfinished jobs....

I don't know why this happens because the Makefile itself seems correctly structured, but LTO is complex. There are two simple workarounds:

  1. Add options=(!lto) to the PKGBUILD. This disables LTO entirely, which is reasonable since this package is not likely to benefit from it.
  2. Change make to make -j1 in the PKGBUILD. This serializes the LTO steps which seems to fix the problem, though it makes the build slower of course.

Unrelated note to maintainer: ./mkconfig.sh can be removed from the PKGBUILD too. The output of that script is used in the Makefile, but executing it as part of the build() function is pointless, because it has no side-effects.

maksverver commented on 2023-09-30 12:57 (UTC)

Here's a patch to fix the build: https://pastebin.com/raw/ZCiPA0jd

maksverver commented on 2023-09-30 12:45 (UTC) (edited on 2023-09-30 12:46 (UTC) by maksverver)

This package currently does not build when CFLAGS contains a comma, which happens with the default value of CFLAGS defined in /etc/makepkg.conf, which contains "-Wp,-D_FORTIFY_SOURCE=2".

The reason is that configure.sh contains:

sed \
  -e "s,@CC@,$CC," \
  -e "s,@CFLAGS@,$CFLAGS," \
  -e "s,@TARGETS@,$TARGETS," \
makefile.in > makefile

Note that this is using , as a delimiter for the substitution command, which means it cannot also occur in the replacement string.

I worked around it by overriding CFLAGS in the PKGBUILD to remove the argument with a comma. But maybe configure.sh should be patched to use a different delimiter. I'd suggest '#' instead of ',' since if CFLAGS contains '#' it cannot be directly substituted in a Makefile (without escaping, the # would be interpreted as the start of a comment). Note that this still suffers from the problem that substrings like '\1' or '&' would be interpreted as backreferences.

zozozo commented on 2017-05-11 08:44 (UTC)

Would it be possible to also install the C library files for picosat together with the binaries ?

reflectionalist commented on 2014-12-12 04:44 (UTC)

Update to release 960