Opened 3 years ago

Closed 3 months ago

#29573 closed defect (invalid)

qepcad build fails on slackware-14.2-maximal

Reported by: Matthias Köppe Owned by:
Priority: major Milestone: sage-duplicate/invalid/wontfix
Component: packages: optional Keywords:
Cc: Dima Pasechnik Merged in:
Authors: Reviewers: Matthias Koeppe, Samuel Lelièvre
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description (last modified by Matthias Köppe)

https://github.com/mkoeppe/sage/runs/612693004

g++ -O3 -g -Wl,-rpath,/sage/local/lib -I/sage/local/lib/saclib/include  -I. saclib/GCSI.c saclib/FAIL.c \
  qepcad.a /sage/local/var/tmp/sage/build/qepcad-B.1.72/src/extensions/sfext/sfexto.a /sage/local/var/tmp/sage/build/qepcad-B.1.72/src/extensions/lift2D/lift2Do.a /sage/local/var/tmp/sage/build/qepcad-B.1.72/src/extensions/newadj/newadjo.a /sage/local/var/tmp/sage/build/qepcad-B.1.72/src/extensions/adj2d/adj2do.a /sage/local/var/tmp/sage/build/qepcad-B.1.72/src/extensions/rend/rendo.a /sage/local/lib/saclib/lib/saclibo.a -lreadline -lrt  qepcad.a /sage/local/var/tmp/sage/build/qepcad-B.1.72/src/extensions/sfext/sfexto.a /sage/local/var/tmp/sage/build/qepcad-B.1.72/src/extensions/lift2D/lift2Do.a /sage/local/var/tmp/sage/build/qepcad-B.1.72/src/extensions/newadj/newadjo.a /sage/local/var/tmp/sage/build/qepcad-B.1.72/src/extensions/adj2d/adj2do.a /sage/local/var/tmp/sage/build/qepcad-B.1.72/src/extensions/rend/rendo.a /sage/local/lib/saclib/lib/saclibo.a -lreadline -lrt  -o qepcad
/usr/lib64/gcc/x86_64-slackware-linux/5.5.0/../../../../lib64/libreadline.so: undefined reference to `tgetnum'
/usr/lib64/gcc/x86_64-slackware-linux/5.5.0/../../../../lib64/libreadline.so: undefined reference to `tgetent'
/usr/lib64/gcc/x86_64-slackware-linux/5.5.0/../../../../lib64/libreadline.so: undefined reference to `tgetstr'
/usr/lib64/gcc/x86_64-slackware-linux/5.5.0/../../../../lib64/libreadline.so: undefined reference to `tgoto'
/usr/lib64/gcc/x86_64-slackware-linux/5.5.0/../../../../lib64/libreadline.so: undefined reference to `UP'
/usr/lib64/gcc/x86_64-slackware-linux/5.5.0/../../../../lib64/libreadline.so: undefined reference to `BC'
/usr/lib64/gcc/x86_64-slackware-linux/5.5.0/../../../../lib64/libreadline.so: undefined reference to `tputs'
/usr/lib64/gcc/x86_64-slackware-linux/5.5.0/../../../../lib64/libreadline.so: undefined reference to `PC'
/usr/lib64/gcc/x86_64-slackware-linux/5.5.0/../../../../lib64/libreadline.so: undefined reference to `tgetflag'
collect2: error: ld returned 1 exit status

To try: docker run -it docker.pkg.github.com/mkoeppe/sage/sage-docker-slackware-14.2-maximal-with-targets-optional:9.1.rc0-66177-gcf8d125574

Change History (46)

comment:1 Changed 3 years ago by Matthias Köppe

Description: modified (diff)

comment:2 Changed 3 years ago by Matthias Köppe

Description: modified (diff)

comment:3 Changed 3 years ago by Matthias Köppe

Looks like libreadline is underlinked on slackware

sh-4.3# ldd /usr/lib64/libreadline.so*
/usr/lib64/libreadline.so:
	linux-vdso.so.1 (0x00007ffc743df000)
	libc.so.6 => /lib64/libc.so.6 (0x00007f2303446000)
	/lib64/ld-linux-x86-64.so.2 (0x00007f2303a58000)
/usr/lib64/libreadline.so.5:
	linux-vdso.so.1 (0x00007fff86f96000)
	libc.so.6 => /lib64/libc.so.6 (0x00007f58cbdde000)
	/lib64/ld-linux-x86-64.so.2 (0x00007f58cc3e5000)
/usr/lib64/libreadline.so.5.2:
	linux-vdso.so.1 (0x00007ffe4a7db000)
	libc.so.6 => /lib64/libc.so.6 (0x00007f7b24b17000)
	/lib64/ld-linux-x86-64.so.2 (0x00007f7b2511e000)
/usr/lib64/libreadline.so.6:
	linux-vdso.so.1 (0x00007ffd00ff8000)
	libc.so.6 => /lib64/libc.so.6 (0x00007f40c3854000)
	/lib64/ld-linux-x86-64.so.2 (0x00007f40c3e66000)
/usr/lib64/libreadline.so.6.3:
	linux-vdso.so.1 (0x00007fffb9253000)
	libc.so.6 => /lib64/libc.so.6 (0x00007f1818931000)
	/lib64/ld-linux-x86-64.so.2 (0x00007f1818f43000)
sh-4.3# ls /usr/lib64/libreadline.*  
/usr/lib64/libreadline.so  /usr/lib64/libreadline.so.5	/usr/lib64/libreadline.so.5.2  /usr/lib64/libreadline.so.6  /usr/lib64/libreadline.so.6.3
sh-4.3# ls -l /usr/lib64/libreadline.*
lrwxrwxrwx 1 root root     16 Apr 23 17:05 /usr/lib64/libreadline.so -> libreadline.so.6
lrwxrwxrwx 1 root root     18 Mar 29  2019 /usr/lib64/libreadline.so.5 -> libreadline.so.5.2
-rwxr-xr-x 1 root root 249328 Aug 15  2015 /usr/lib64/libreadline.so.5.2
lrwxrwxrwx 1 root root     18 Apr 23 17:05 /usr/lib64/libreadline.so.6 -> libreadline.so.6.3
-rwxr-xr-x 1 root root 291680 Nov  7  2015 /usr/lib64/libreadline.so.6.3
sh-4.3# nm -D /usr/lib64/libreadline.so.5 | grep tgetnum
                 U tgetnum
sh-4.3# nm -D /usr/lib64/libreadline.so.6 | grep tgetnum
                 U tgetnum
sh-4.3# nm -D /usr/lib64/libncurses | grep tgetnum
libncurses++.so       libncurses++.so.5     libncurses++.so.5.9   libncurses++w.so      libncurses++w.so.5    libncurses++w.so.5.9  libncurses.so         libncurses.so.5       libncursesw.so        libncursesw.so.5
sh-4.3# nm -D /usr/lib64/libncurses | grep tgetnum
libncurses++.so       libncurses++.so.5     libncurses++.so.5.9   libncurses++w.so      libncurses++w.so.5    libncurses++w.so.5.9  libncurses.so         libncurses.so.5       libncursesw.so        libncursesw.so.5
sh-4.3# nm -D /usr/lib64/libncurses.so | grep tgetnum
000000000002fe70 T tgetnum

comment:4 Changed 3 years ago by Dima Pasechnik

Is there pkg-config support for readline on Slackware, and if yes, does it correctly list libs ot link against?

comment:5 Changed 3 years ago by Matthias Köppe

Neither a .pc file nor a .la file

comment:6 Changed 3 years ago by Dima Pasechnik

OK, so this is underlinking that needs to be tested in readline's spkg-configure. And the name of the library has to be found from ac_cv_search_wresize set by AC_SEARCH_LIBS in ncurses' spkg-configure, or the result of pkg-config --libs ncurses (this to be done on #29000).

comment:7 Changed 3 years ago by Dima Pasechnik

Do we already have a ready to use docker image with Sage on Slackware, or this is still not complete?

comment:8 Changed 3 years ago by Matthias Köppe

Yes, see ticket description for the command line for pulling it!

comment:9 Changed 3 years ago by Dima Pasechnik

$ docker run -it docker.pkg.github.com/mkoeppe/sage/sage-docker-slackware-14.2-maximal-with-targets-optional:9.1.rc0-66177-gcf8d125574 Unable to find image 'docker.pkg.github.com/mkoeppe/sage/sage-docker-slackware-14.2-maximal-with-targets-optional:9.1.rc0-66177-gcf8d125574' locally docker: Error response from daemon: Get https://docker.pkg.github.com/v2/mkoeppe/sage/sage-docker-slackware-14.2-maximal-with-targets-optional/manifests/9.1.rc0-66177-gcf8d125574: no basic auth credentials.

comment:10 Changed 3 years ago by Matthias Köppe

From the doc added:

+The ``docker`` workflows automatically push images to
+``docker.pkg.github.com``.  You find them in the Packages tab of your
+GitHub repository.
+
+In order to pull them for use on your computer, you need to first
+visit https://github.com/settings/tokens/new to generate a Personal
+Access Token providing the ``read:packages`` scope.  Then log in using
+your GitHub user name and the Personal Access Token::
+
+  $ docker login docker.pkg.github.com
+
+Now you can pull the image and run it::
+
+  $ docker pull docker.pkg.github.com/mkoeppe/sage/sage-docker-fedora-31-standard-configured:f4bd671
+  $ docker run -it docker.pkg.github.com/mkoeppe/sage/sage-docker-fedora-31-standard-configured:f4bd671 bash

comment:11 Changed 3 years ago by Matthias Köppe

(from #29530)

comment:12 Changed 3 years ago by Dima Pasechnik

No idea what to do with that GH token, it's not clear where is has to go, whether one need an external helper to deal with credential store etc. A bloody mess...

Could it be that you have not authorised 3rd parties to pull that image?

comment:13 Changed 3 years ago by Dima Pasechnik

I can log in to docker with my login and password. I have no idea what "log in using your GitHub user name and the Personal Access Token" entails. That token has to go somewhere, but where?

comment:14 Changed 3 years ago by Matthias Köppe

I used docker login docker.pkg.github.com --username mkoeppe --password-stdin

comment:15 in reply to:  12 Changed 3 years ago by Matthias Köppe

Replying to dimpase:

Could it be that you have not authorised 3rd parties to pull that image?

No, I think this is public

comment:16 Changed 3 years ago by Dima Pasechnik

dimpase@penguin:~/sage$ docker login docker.pkg.github.com
Authenticating with existing credentials...
WARNING! Your password will be stored unencrypted in /home/dimpase/.docker/config.json.
Configure a credential helper to remove this warning. See
https://docs.docker.com/engine/reference/commandline/login/#credentials-store

Login Succeeded
dimpase@penguin:~/sage$ docker pull docker.pkg.github.com/mkoeppe/sage/sage-docker-slackware-14.2-maximal-with-targets-optional:9.1.rc0-66177-gcf8d125574
Error response from daemon: unauthorized: Your request could not be authenticated by the GitHub Packages service. Please ensure your access token is valid and has the appropriate scopes configured.

comment:17 Changed 3 years ago by Matthias Köppe

And your "existing credentials" are the new Personal Access Token?

comment:18 Changed 3 years ago by Matthias Köppe

Otherwise please try again with docker login docker.pkg.github.com --username dimpase --password-stdin and paste your PAT

comment:19 in reply to:  18 Changed 3 years ago by Dima Pasechnik

Replying to mkoeppe:

Otherwise please try again with docker login docker.pkg.github.com --username dimpase --password-stdin and paste your PAT

they are not new, but I don't get the logic of getting a new PAT, the relationship between GH and docker is totally opaque....

comment:20 Changed 3 years ago by Matthias Köppe

github is running its own docker registry, which I use here instead of DockerHub?

comment:21 Changed 3 years ago by Matthias Köppe

I don't get either why authentication is necessary to access a public resource, but that's a fact

comment:22 in reply to:  21 Changed 3 years ago by Dima Pasechnik

$ docker login docker.pkg.github.com
username: dimpase
password: <pasted PAT>

...
Login Succeeded
$ docker pull docker.pkg.github.com/mkoeppe/sage/sage-docker-slackware-14.2-maximal-with-targets-optional:9.1.rc0-66177-gcf8d125574
Error response from daemon: unauthorized: Your token has not been granted the required scopes to execute this query. The 'name' field requires one of the following scopes: ['read:packages'], but your token has only been granted the: [''] scopes. Please modify your token's scopes at: https://github.com/settings/tokens.

comment:23 Changed 3 years ago by Dima Pasechnik

By the way, docker login docker.pkg.github.com with --username etc never gave me a prompt. (This is on Debian buster).

comment:24 Changed 3 years ago by Dima Pasechnik

Please add something about the need to Select scopes (and the correct ones) while creating/updating GH PAT. (We're reviewing #29530 here :-))

after this change, I am able to docker pull, at least.

comment:25 Changed 3 years ago by Matthias Köppe

So you succeeded after selecting the scopre read:packages? Or something else?

comment:26 Changed 3 years ago by Dima Pasechnik

Yes, I was able to pull and run the container.

comment:27 Changed 3 years ago by Matthias Köppe

OK great, I'll extend the documentation of #29530

comment:28 Changed 3 years ago by Matthias Köppe

Done, please review

comment:29 in reply to:  3 Changed 3 years ago by Dima Pasechnik

Replying to mkoeppe:

Looks like libreadline is underlinked on slackware

sh-4.3# ldd /usr/lib64/libreadline.so*
/usr/lib64/libreadline.so:
	linux-vdso.so.1 (0x00007ffc743df000)
	libc.so.6 => /lib64/libc.so.6 (0x00007f2303446000)
	/lib64/ld-linux-x86-64.so.2 (0x00007f2303a58000)
/usr/lib64/libreadline.so.5:
	linux-vdso.so.1 (0x00007fff86f96000)
	libc.so.6 => /lib64/libc.so.6 (0x00007f58cbdde000)
	/lib64/ld-linux-x86-64.so.2 (0x00007f58cc3e5000)
/usr/lib64/libreadline.so.5.2:
	linux-vdso.so.1 (0x00007ffe4a7db000)
	libc.so.6 => /lib64/libc.so.6 (0x00007f7b24b17000)
	/lib64/ld-linux-x86-64.so.2 (0x00007f7b2511e000)
/usr/lib64/libreadline.so.6:
	linux-vdso.so.1 (0x00007ffd00ff8000)
	libc.so.6 => /lib64/libc.so.6 (0x00007f40c3854000)
	/lib64/ld-linux-x86-64.so.2 (0x00007f40c3e66000)
/usr/lib64/libreadline.so.6.3:
	linux-vdso.so.1 (0x00007fffb9253000)
	libc.so.6 => /lib64/libc.so.6 (0x00007f1818931000)
	/lib64/ld-linux-x86-64.so.2 (0x00007f1818f43000)
sh-4.3# ls /usr/lib64/libreadline.*  
/usr/lib64/libreadline.so  /usr/lib64/libreadline.so.5	/usr/lib64/libreadline.so.5.2  /usr/lib64/libreadline.so.6  /usr/lib64/libreadline.so.6.3
sh-4.3# ls -l /usr/lib64/libreadline.*
lrwxrwxrwx 1 root root     16 Apr 23 17:05 /usr/lib64/libreadline.so -> libreadline.so.6
lrwxrwxrwx 1 root root     18 Mar 29  2019 /usr/lib64/libreadline.so.5 -> libreadline.so.5.2
-rwxr-xr-x 1 root root 249328 Aug 15  2015 /usr/lib64/libreadline.so.5.2
lrwxrwxrwx 1 root root     18 Apr 23 17:05 /usr/lib64/libreadline.so.6 -> libreadline.so.6.3
-rwxr-xr-x 1 root root 291680 Nov  7  2015 /usr/lib64/libreadline.so.6.3
sh-4.3# nm -D /usr/lib64/libreadline.so.5 | grep tgetnum
                 U tgetnum
sh-4.3# nm -D /usr/lib64/libreadline.so.6 | grep tgetnum
                 U tgetnum
sh-4.3# nm -D /usr/lib64/libncurses | grep tgetnum
libncurses++.so       libncurses++.so.5     libncurses++.so.5.9   libncurses++w.so      libncurses++w.so.5    libncurses++w.so.5.9  libncurses.so         libncurses.so.5       libncursesw.so        libncursesw.so.5
sh-4.3# nm -D /usr/lib64/libncurses | grep tgetnum
libncurses++.so       libncurses++.so.5     libncurses++.so.5.9   libncurses++w.so      libncurses++w.so.5    libncurses++w.so.5.9  libncurses.so         libncurses.so.5       libncursesw.so        libncursesw.so.5
sh-4.3# nm -D /usr/lib64/libncurses.so | grep tgetnum
000000000002fe70 T tgetnum

how about readline 8, as in https://mirrors.slackware.com/slackware/slackware-current/source/l/readline/

Note that it is supposed to link with ltinfo, cf https://mirror.bytemark.co.uk/slackware/slackware-current/source/l/readline/readline.SlackBuild

comment:30 Changed 3 years ago by Dima Pasechnik

As a fixup, we can remove

build/pkgs/readline/distros/slackware.txt

comment:31 Changed 3 years ago by Dima Pasechnik

or we can add a check that system readline is not underlinked.

comment:32 in reply to:  31 Changed 3 years ago by Dima Pasechnik

Replying to dimpase:

or we can add a check that system readline is not underlinked.

I tried this with AC_SEARCH_LIBS, but I'm getting

configure:16165: checking for library containing tgetnum
configure:16196: gcc -o conftest -g -O2    conftest.c -lreadline -lcurl -lcliquer -lbz2 -lflint -l
mpfr -lgmp -lm  -lntl >&5
/usr/bin/ld: /tmp/ccm3Jhhm.o: undefined reference to symbol 'tgetnum@@NCURSES6_TINFO_5.0.19991023'
/usr/bin/ld: //lib/x86_64-linux-gnu/libtinfo.so.6: error adding symbols: DSO missing from command 
line

not sure what this is.

comment:33 Changed 3 years ago by Matthias Köppe

Try adding -ltinfo?

comment:34 Changed 3 years ago by Dima Pasechnik

but this is meant to test whether libreadline is linked with libtinfo...

comment:35 Changed 3 years ago by Matthias Köppe

Don't you just need to test whether linking a test program with -lreadline works, and whether linking it with -lreadline -ltinfo works?

comment:36 in reply to:  35 Changed 3 years ago by Dima Pasechnik

Replying to mkoeppe:

Don't you just need to test whether linking a test program with -lreadline works,

but this succeeds on slackware - after all this is what AC_SEARCH_LIBS is doing.

Perhaps the test already has tinfo in LIBS?

and whether linking it with -lreadline -ltinfo works?

comment:37 Changed 3 years ago by Matthias Köppe

Are you still working on this?

comment:38 Changed 3 years ago by Matthias Köppe

Milestone: sage-9.1sage-9.2

comment:39 Changed 2 years ago by Matthias Köppe

Milestone: sage-9.2sage-9.3

comment:40 Changed 21 months ago by Matthias Köppe

Milestone: sage-9.3sage-9.4

Sage development has entered the release candidate phase for 9.3. Setting a new milestone for this ticket based on a cursory review of ticket status, priority, and last modification date.

comment:41 Changed 17 months ago by Matthias Köppe

Milestone: sage-9.4sage-9.5

comment:42 Changed 12 months ago by Matthias Köppe

Milestone: sage-9.5sage-9.6

comment:43 Changed 7 months ago by Matthias Köppe

Milestone: sage-9.6sage-9.7

comment:44 Changed 4 months ago by Matthias Köppe

Milestone: sage-9.7sage-duplicate/invalid/wontfix
Status: newneeds_review

We no longer support this platform, should close

comment:45 Changed 3 months ago by Samuel Lelièvre

Reviewers: Matthias Koeppe, Samuel Lelièvre
Status: needs_reviewpositive_review

comment:46 Changed 3 months ago by Matthias Köppe

Resolution: invalid
Status: positive_reviewclosed
Note: See TracTickets for help on using tickets.