Skip to content
This repository has been archived by the owner on Nov 18, 2022. It is now read-only.

riscv / riscv64: posix/config.guess: unable to guess system type #755

Open
sanderjo opened this issue Apr 28, 2021 · 4 comments · May be fixed by #765
Open

riscv / riscv64: posix/config.guess: unable to guess system type #755

sanderjo opened this issue Apr 28, 2021 · 4 comments · May be fixed by #765

Comments

@sanderjo
Copy link
Contributor

sanderjo commented Apr 28, 2021

Trying to configure nzbget on (emulated) RISC-V, I get posix/config.guess: unable to guess system type. Makes me think of an earlier issue from me @hugbug ... ;-) See #418

Solution / workaround was easy: get a fresher config.guess like this (from #418):

wget 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD' -O posix/config.guess
wget 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD' -O posix/config.sub

... and configure was able to run.

With the old config.guess provided by nzbget, things go wrong:

[root@fedora-riscv nzbget]# ./configure
checking build system type... posix/config.guess: unable to guess system type

This script, last modified 2014-11-04, has failed to recognize
the operating system you are using. It is advised that you
download the most up to date version of the config scripts from

  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
and
  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD

If the version you run (posix/config.guess) is already up to date, please
send the following data and any information you think might be
pertinent to <config-patches@gnu.org> in order to provide the needed
information to handle your system.

config.guess timestamp = 2014-11-04

uname -m = riscv64
uname -r = 5.5.0-0.rc5.git0.1.1.riscv64.fc32.riscv64
uname -s = Linux
uname -v = #1 SMP Mon Jan 6 17:31:22 UTC 2020

/usr/bin/uname -p = riscv64
/bin/uname -X     =

hostinfo               =
/bin/universe          =
/usr/bin/arch -k       =
/bin/arch              = riscv64
/usr/bin/oslevel       =
/usr/convex/getsysinfo =

UNAME_MACHINE = riscv64
UNAME_RELEASE = 5.5.0-0.rc5.git0.1.1.riscv64.fc32.riscv64
UNAME_SYSTEM  = Linux
UNAME_VERSION = #1 SMP Mon Jan 6 17:31:22 UTC 2020
configure: error: cannot guess build type; you must specify one
[root@fedora-riscv nzbget]#
@hugbug
Copy link
Member

hugbug commented Apr 28, 2021

Thanks. I'll update the guess files.

@sanderjo
Copy link
Contributor Author

Thanks!

FWIW: after quite some time compiling, the result is there: a nzbget for/on RISC-V:

[root@fedora-riscv nzbget]# file nzbget
nzbget: ELF 64-bit LSB executable, UCB RISC-V, version 1 (GNU/Linux), dynamically linked, interpreter /lib/ld-linux-riscv64-lp64d.so.1, BuildID[sha1]=bda57c8cb715a29f92cc2f60201593a34ab7f8c0, for GNU/Linux 4.15.0, with debug_info, not stripped

and it's working:

[root@fedora-riscv nzbget]# ./nzbget --version
nzbget version: 21.1-testing-r2329M
[root@fedora-riscv nzbget]#

[root@fedora-riscv nzbget]# ./nzbget --help
Usage:
  nzbget [switches]

Switches:
  -h, --help                Print this help-message
  -v, --version             Print version and exit
  -c, --configfile <file>   Filename of configuration-file
  -n, --noconfigfile        Prevent loading of configuration-file
                            (required options must be passed with --option)
  -p, --printconfig         Print configuration and exit
  -o, --option <name=value> Set or override option in configuration-file
  -s, --server              Start nzbget as a server in console-mode
  -D, --daemon              Start nzbget as a server in daemon-mode
  -V, --serverversion       Print server's version and exit
  -Q, --quit                Shutdown server


@sanderjo sanderjo changed the title riscv / risv64: posix/config.guess: unable to guess system type riscv / riscv64: posix/config.guess: unable to guess system type Apr 28, 2021
@sanderjo
Copy link
Contributor Author

sanderjo commented May 24, 2021

FWIW:

Ubuntu on RISC-V / riscv64 contains nzbget in the repo's. So just sudo apt install nzbget and you're done. Nice.

sander@ubuntu:~$ which nzbget
/usr/bin/nzbget

sander@ubuntu:~$ dpkg -S /usr/bin/nzbget
nzbget: /usr/bin/nzbget

sander@ubuntu:~$ file /usr/bin/nzbget
/usr/bin/nzbget: ELF 64-bit LSB shared object, UCB RISC-V, version 1 (GNU/Linux), dynamically linked, interpreter /lib/ld-linux-riscv64-lp64d.so.1, BuildID[sha1]=3140b03b01be5cd925c9d4707fdc0654534bb1e6, for GNU/Linux 4.15.0, stripped

sander@ubuntu:~$ 

and FWIW: the needed libraries

sander@ubuntu:~$ ldd /usr/bin/nzbget
	linux-vdso.so.1 (0x0000003fe798e000)
	libpthread.so.0 => /lib/riscv64-linux-gnu/libpthread.so.0 (0x0000003fe782d000)
	libxml2.so.2 => /lib/riscv64-linux-gnu/libxml2.so.2 (0x0000003fe7700000)
	libncurses.so.6 => /lib/riscv64-linux-gnu/libncurses.so.6 (0x0000003fe76e5000)
	libtinfo.so.6 => /lib/riscv64-linux-gnu/libtinfo.so.6 (0x0000003fe76bd000)
	libssl.so.1.1 => /lib/riscv64-linux-gnu/libssl.so.1.1 (0x0000003fe7653000)
	libcrypto.so.1.1 => /lib/riscv64-linux-gnu/libcrypto.so.1.1 (0x0000003fe7485000)
	libz.so.1 => /lib/riscv64-linux-gnu/libz.so.1 (0x0000003fe746d000)
	libstdc++.so.6 => /lib/riscv64-linux-gnu/libstdc++.so.6 (0x0000003fe72c6000)
	libgcc_s.so.1 => /lib/riscv64-linux-gnu/libgcc_s.so.1 (0x0000003fe72b2000)
	libc.so.6 => /lib/riscv64-linux-gnu/libc.so.6 (0x0000003fe71a6000)
	/lib/ld-linux-riscv64-lp64d.so.1 (0x0000003fe7990000)
	libdl.so.2 => /lib/riscv64-linux-gnu/libdl.so.2 (0x0000003fe71a2000)
	libicuuc.so.66 => /lib/riscv64-linux-gnu/libicuuc.so.66 (0x0000003fe7001000)
	liblzma.so.5 => /lib/riscv64-linux-gnu/liblzma.so.5 (0x0000003fe6fe1000)
	libm.so.6 => /lib/riscv64-linux-gnu/libm.so.6 (0x0000003fe6f5d000)
	libicudata.so.66 => /lib/riscv64-linux-gnu/libicudata.so.66 (0x0000003fe549e000)

@sanderjo
Copy link
Contributor Author

sanderjo commented May 29, 2021

Ah, this is an easier / cleaner method to update posix/config.guess and posix/config.sub (based on easybuilders/easybuild-easyblocks#1276 (comment) ):

From the github nzbget directory:

sudo apt install automake -y
aclocal
automake --add-missing --copy --force-missing

... and posix/config.guess and posix/config.sub are updated!

Proof:

-rwxr-xr-x  1 sander sander 44283 May 29 18:08 config.guess*
-rwxr-xr-x  1 sander sander 36136 May 29 18:08 config.sub*

then renew:

sander@ubuntu:~/git/nzbget$ date ; automake --add-missing --copy --force-missing ; ll posix/config.* ; date
Sat May 29 18:28:30 UTC 2021
-rwxr-xr-x 1 sander sander 44283 May 29 18:28 posix/config.guess*
-rwxr-xr-x 1 sander sander 36136 May 29 18:28 posix/config.sub*
Sat May 29 18:28:54 UTC 2021

and ./configure runs nicely.

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

Successfully merging a pull request may close this issue.

2 participants