Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

qepcad build fails on slackware-14.2-maximal #29573

Closed
mkoeppe opened this issue Apr 25, 2020 · 40 comments
Closed

qepcad build fails on slackware-14.2-maximal #29573

mkoeppe opened this issue Apr 25, 2020 · 40 comments

Comments

@mkoeppe
Copy link
Member

mkoeppe commented Apr 25, 2020

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

CC: @dimpase

Component: packages: optional

Reviewer: Matthias Koeppe, Samuel Lelièvre

Issue created by migration from https://trac.sagemath.org/ticket/29573

@mkoeppe mkoeppe added this to the sage-9.1 milestone Apr 25, 2020
@mkoeppe

This comment has been minimized.

@mkoeppe

This comment has been minimized.

@mkoeppe
Copy link
Member Author

mkoeppe commented Apr 25, 2020

comment:3

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

@dimpase
Copy link
Member

dimpase commented Apr 25, 2020

comment:4

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

@mkoeppe
Copy link
Member Author

mkoeppe commented Apr 25, 2020

comment:5

Neither a .pc file nor a .la file

@dimpase
Copy link
Member

dimpase commented Apr 25, 2020

comment:6

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).

@dimpase
Copy link
Member

dimpase commented Apr 25, 2020

comment:7

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

@mkoeppe
Copy link
Member Author

mkoeppe commented Apr 25, 2020

comment:8

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

@dimpase
Copy link
Member

dimpase commented Apr 25, 2020

comment:9

$ 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.

@mkoeppe
Copy link
Member Author

mkoeppe commented Apr 25, 2020

comment:10

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

@mkoeppe
Copy link
Member Author

mkoeppe commented Apr 25, 2020

comment:11

(from #29530)

@dimpase
Copy link
Member

dimpase commented Apr 25, 2020

comment:12

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?

@dimpase
Copy link
Member

dimpase commented Apr 25, 2020

comment:13

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?

@mkoeppe
Copy link
Member Author

mkoeppe commented Apr 25, 2020

comment:14

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

@mkoeppe
Copy link
Member Author

mkoeppe commented Apr 25, 2020

comment:15

Replying to @dimpase:

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

No, I think this is public

@dimpase
Copy link
Member

dimpase commented Apr 25, 2020

comment:16
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.

@mkoeppe
Copy link
Member Author

mkoeppe commented Apr 25, 2020

comment:17

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

@mkoeppe
Copy link
Member Author

mkoeppe commented Apr 25, 2020

comment:18

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

@dimpase
Copy link
Member

dimpase commented Apr 25, 2020

comment:19

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....

@mkoeppe
Copy link
Member Author

mkoeppe commented Apr 25, 2020

comment:20

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

@mkoeppe
Copy link
Member Author

mkoeppe commented Apr 25, 2020

comment:21

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

@dimpase
Copy link
Member

dimpase commented Apr 25, 2020

comment:22
$ 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.

@dimpase
Copy link
Member

dimpase commented Apr 25, 2020

comment:23

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

@dimpase
Copy link
Member

dimpase commented Apr 25, 2020

comment:24

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.

@mkoeppe
Copy link
Member Author

mkoeppe commented Apr 25, 2020

comment:25

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

@dimpase
Copy link
Member

dimpase commented Apr 25, 2020

comment:26

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

@dimpase
Copy link
Member

dimpase commented May 2, 2020

comment:30

As a fixup, we can remove

build/pkgs/readline/distros/slackware.txt

@dimpase
Copy link
Member

dimpase commented May 2, 2020

comment:31

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

@dimpase
Copy link
Member

dimpase commented May 3, 2020

comment:32

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.

@mkoeppe
Copy link
Member Author

mkoeppe commented May 3, 2020

comment:33

Try adding -ltinfo?

@dimpase
Copy link
Member

dimpase commented May 3, 2020

comment:34

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

@mkoeppe
Copy link
Member Author

mkoeppe commented May 4, 2020

comment:35

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

@dimpase
Copy link
Member

dimpase commented May 4, 2020

comment:36

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?

@mkoeppe
Copy link
Member Author

mkoeppe commented May 5, 2020

comment:37

Are you still working on this?

@mkoeppe mkoeppe modified the milestones: sage-9.1, sage-9.2 May 6, 2020
@mkoeppe mkoeppe modified the milestones: sage-9.2, sage-9.3 Oct 24, 2020
@mkoeppe
Copy link
Member Author

mkoeppe commented Mar 24, 2021

comment:40

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.

@mkoeppe mkoeppe modified the milestones: sage-9.3, sage-9.4 Mar 24, 2021
@mkoeppe mkoeppe modified the milestones: sage-9.4, sage-9.5 Jul 19, 2021
@mkoeppe mkoeppe modified the milestones: sage-9.5, sage-9.6 Dec 18, 2021
@mkoeppe mkoeppe modified the milestones: sage-9.6, sage-9.7 May 3, 2022
@mkoeppe
Copy link
Member Author

mkoeppe commented Aug 1, 2022

comment:44

We no longer support this platform, should close

@mkoeppe mkoeppe removed this from the sage-9.7 milestone Aug 1, 2022
@slel
Copy link
Member

slel commented Aug 25, 2022

Reviewer: Matthias Koeppe, Samuel Lelièvre

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants