Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 594552 - dev-lisp/clisp fails to build with sys-libs/readline-7.0
Summary: dev-lisp/clisp fails to build with sys-libs/readline-7.0
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: Common Lisp Bugs
URL: https://sourceforge.net/p/clisp/bugs/...
Whiteboard:
Keywords:
: 595484 (view as bug list)
Depends on: 638942
Blocks:
  Show dependency tree
 
Reported: 2016-09-20 19:54 UTC by Markus Walter
Modified: 2019-06-15 12:09 UTC (History)
7 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build log (clisp-2.49-r8:20160920-183737.log,387.92 KB, text/plain)
2016-09-20 19:54 UTC, Markus Walter
Details
emerge --info (info.txt,7.48 KB, text/plain)
2016-09-20 19:54 UTC, Markus Walter
Details
patch for readline.lisp and clisp-2.49-r8.ebuild (should be -r9 I guess) (clisp-2.49-readline-7.0-ebuild.patch,1.77 KB, patch)
2016-09-23 10:41 UTC, David Haller
Details | Diff
build log including proposed patch (clisp-2.49-r8:20160926-202906.log,387.95 KB, text/plain)
2016-09-27 07:54 UTC, Markus Walter
Details
build log (doj-build.log.gz,49.83 KB, application/gzip)
2018-01-06 15:41 UTC, doj
Details
build environment (doj-environment.gz,22.47 KB, application/gzip)
2018-01-06 15:42 UTC, doj
Details
emerge --info (doj-info,6.24 KB, text/plain)
2018-01-06 15:43 UTC, doj
Details
emerge --pqv (doj-pqv,147 bytes, text/plain)
2018-01-06 15:44 UTC, doj
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Walter 2016-09-20 19:54:06 UTC
Created attachment 446962 [details]
build log

On my hardened ~amd64 system with unmasked readline I see the following build failure.

;; Loading file /var/tmp/portage/dev-lisp/clisp-2.49-r8/work/clisp-2.49/builddir/readline/readline.fas ...
*** - FFI::FIND-FOREIGN-VARIABLE: foreign variable #<FOREIGN-VARIABLE "rl_readline_state" #x0000012430C26F00> does not have the required size or alignment
Comment 1 Markus Walter 2016-09-20 19:54:30 UTC
Created attachment 446964 [details]
emerge --info
Comment 2 David Haller 2016-09-23 10:39:12 UTC
Same here, got a patch.
Comment 3 David Haller 2016-09-23 10:41:09 UTC
Created attachment 447492 [details, diff]
patch for readline.lisp and clisp-2.49-r8.ebuild (should be -r9 I guess)
Comment 4 Markus Walter 2016-09-26 20:37:45 UTC
(In reply to David Haller from comment #3)
> Created attachment 447492 [details, diff] [details, diff]
> patch for readline.lisp and clisp-2.49-r8.ebuild (should be -r9 I guess)

Unfortunately the patch didn't work here. The error is the same (modulo a changed constant which is probably irrelevant).
Comment 5 David Haller 2016-09-27 07:44:12 UTC
(In reply to Markus Oehme from comment #4)
> Unfortunately the patch didn't work here. The error is the same (modulo a
> changed constant which is probably irrelevant).

build.log?
Comment 6 Markus Walter 2016-09-27 07:54:21 UTC
Created attachment 448112 [details]
build log including proposed patch

Here you go.
Comment 7 Viktor Yu. Kovalskii 2016-09-28 05:30:11 UTC
Upstream bug report:

https://sourceforge.net/p/clisp/bugs/688/
Comment 8 Markus Walter 2016-09-28 06:50:38 UTC
The proposed patch in the upstream bug worked for me.
Comment 9 Coacher 2016-09-29 01:26:11 UTC
*** Bug 595484 has been marked as a duplicate of this bug. ***
Comment 10 email200202 2016-09-29 15:02:22 UTC
The proposed patch in the upstream bug worked for me too.
Comment 11 Andrey Grozin gentoo-dev 2016-09-29 15:38:17 UTC
(In reply to email200202 from comment #10)
> The proposed patch in the upstream bug worked for me too.
This patch (naturally) breaks building clisp for all users who has <sys-libs/readline-7, i.e., for the vast majority of users. The same error:

;; Loading file /var/tmp/portage/dev-lisp/clisp-2.49-r9/work/clisp-2.49/builddir/readline/readline.fas ...
*** - FFI::FIND-FOREIGN-VARIABLE: foreign variable #<FOREIGN-VARIABLE "rl_readline_state" #x0000000000847C20> does not have the
      required size or alignment
Comment 12 Andrey Grozin gentoo-dev 2016-09-30 11:15:19 UTC
One more comment: clisp with this patch (for those users who has installed readline-7) should be in a new subslot, because it will break all packages depending on it: maxima, fricas, ... They will need re-emerging.
Comment 13 email200202 2016-10-01 08:30:52 UTC
Andrey, 

For ~amd64, the current situation is that you cannot build the latest versions:
(unstable version)realine-7
(stable version)clisp-2.49-r8
(unstable version)maxima-5.38.1

Adding a new (unstable version)clisp-2.49-r9 for clisp with the patch will make them build.

Best Regards.
Comment 14 David Haller 2016-10-02 01:39:24 UTC
(In reply to Markus Oehme from comment #8)
> The proposed patch in the upstream bug worked for me.

The upstream patch is _identical_ to mine. What have you done that mine did not work? You did apply it to the ebuild, no? I.e.

# cd /usr[/local]/portage/
# patch -p1 < /path/to/my_patch_file

(which patches the -p8 ebuild and adds the "upstream" patch to the files dir of dev-lisp/clisp).

(In reply to Andrey Grozin from comment #11)
> (In reply to email200202 from comment #10)
> > The proposed patch in the upstream bug worked for me too.
> This patch (naturally) breaks building clisp for all users who has
> <sys-libs/readline-7,

My patch to the ebuild adresses this as well:

+	if use readline && has_version ">=sys-libs/readline-7.0"; then
+	    epatch "${FILESDIR}/${P}-readline-7.0-rl_readline_state.patch"
+	fi

*gosh* Don't you read supplied patches?

No idea about the correct slotting to get proper rebuilds though.

Somewhat annoyed,
-dnh
Comment 15 Andreas Proteus 2016-10-02 02:51:09 UTC
(In reply to David Haller from comment #14)
I used your patch on the 24rd last and clisp as well as all dependencies build successfully.  

Sorry for not posting this earlier.

Thank you for your post.
Comment 16 Markus Walter 2016-10-02 10:04:48 UTC
(In reply to David Haller from comment #14)
> (In reply to Markus Oehme from comment #8)
> > The proposed patch in the upstream bug worked for me.
> 
> The upstream patch is _identical_ to mine. What have you done that mine did
> not work? You did apply it to the ebuild, no? I.e.
> 
> # cd /usr[/local]/portage/
> # patch -p1 < /path/to/my_patch_file
> 
> (which patches the -p8 ebuild and adds the "upstream" patch to the files dir
> of dev-lisp/clisp).

Shucks, I failed there, because I simply copied the contents for the patch out ouf your patch, while not removing one level of +. However I'm amazed, that the result applied.
Comment 17 email200202 2016-10-03 05:00:08 UTC
dev-lisp/clisp-2.49-r9 builds successfully.
Comment 18 David Haller 2016-11-12 07:25:23 UTC
(In reply to email200202 from comment #17)
> dev-lisp/clisp-2.49-r9 builds successfully.

But it applies the rl-7 patch unconditionally!

# grep readline clisp-2.49-r9.ebuild 
IUSE="hyperspec X berkdb dbus fastcgi gdbm gtk pari +pcre postgres +readline svm -threads +unicode +zlib"
                 readline? ( >=sys-libs/readline-7.0:0= )
        epatch "${FILESDIR}"/${P}-readline-7.patch

This is bullshit when my simple patch to the ebuild works:

+	if use readline && has_version ">=sys-libs/readline-7.0"; then
+	    epatch "${FILESDIR}/${P}-readline-7.0-rl_readline_state.patch"
+	fi

And it'll happily build with readline < 7.0 (modulo patch filename).

*Gosh* Can you, Andrey, not read and learn how to apply patches
conditionally?

==== dev-lisp/clisp/Changelog ====
*clisp-2.49-r9 (02 Oct 2016)

  02 Oct 2016; Andrey Grozin <grozin@gentoo.org> +clisp-2.49-r9.ebuild,
  +files/clisp-2.49-readline-7.patch:
  2.49-r9 for readline-7

  Bug: 595624
====

I was busy lately, but I can't belive that my readymade patch for ebuild
and SW (identical to upstream, and upstream's patch could've been used as
well) was not used. [..]

Oh boy...
Comment 19 Andrey Grozin gentoo-dev 2016-11-12 09:38:52 UTC
(In reply to David Haller from comment #18)
> But it applies the rl-7 patch unconditionally!
Of course it does. clisp-2.49-r9.ebuild depends on >=sys-libs/readline-7.0:0= and applies the patch unconditionally. clisp-2.49-r8 depends on >=sys-libs/readline-5.0 <sys-libs/readline-7.0 and does not apply the patch. These two ebuilds have SLOT="2/${PV}", i.e., different subslots. When somebody upgrades from 2.49-r8 to 2.49-r9, all dependencies (maxima, fricas[clisp]) will be re-emerged. Your solution with the patch applied conditionally will silently leave all maxima users with non-functional maxima after this upgrade. I did not want this.
Comment 20 doj 2018-01-06 15:38:00 UTC
I have the same problem now. Building on amd64 and after an update of the readline ebuild, my clisp now fails with

;; Loading file /var/tmp/portage/dev-lisp/clisp-2.49-r8/work/clisp-2.49/builddir/readline/readline.fas ...
*** - FFI::FIND-FOREIGN-VARIABLE: foreign variable #<FOREIGN-VARIABLE "rl_readline_state" #x0000564F697211C0> does not have the required size or alignment

I'll attach my build logs. Look for the files starting with doj-*
Comment 21 doj 2018-01-06 15:41:55 UTC
Created attachment 513522 [details]
build log
Comment 22 doj 2018-01-06 15:42:54 UTC
Created attachment 513524 [details]
build environment
Comment 23 doj 2018-01-06 15:43:42 UTC
Created attachment 513526 [details]
emerge --info
Comment 24 doj 2018-01-06 15:44:06 UTC
Created attachment 513528 [details]
emerge --pqv
Comment 25 James Jones 2018-01-11 00:13:51 UTC
Had the same problem as doj.  Fixed it by enabling the new ebuilds with David Haller's fix by adding the following to /etc/portage/package.accept_keywords:

# Gentoo Bug 594552
=dev-lisp/clisp-2.49-r101 ~amd64
Comment 26 Christoph Löhr 2018-02-02 06:58:42 UTC
See Bug 638514

=dev-lisp/clisp-2.49-r101 ~amd64 
is no longer compiling after profile switch to 17.0

Workaround dev-lisp/clisp-2.49-r60 does not compile on x86
Bug 638514 Comment 15
Comment 27 Cyprien Nicolas (fulax) 2019-06-15 12:09:34 UTC
I believe this issue has been fixed in newer clisp versions