wrljet / hercules-helper

Utility scripts to help with building and deploying the Hercules emulator
MIT License
39 stars 14 forks source link

Cannot Complete on Kubuntu ARM due to Error --> configure: error: cannot guess build type; you must specify one #42

Open trigger2k20 opened 3 months ago

trigger2k20 commented 3 months ago

Hello I would like to execute the Hercules helper script on a vanilla Kubuntu ARM due to an error in the preparation of the compile run.

According to the output, I downloaded the newest version of "config.guess" and (the default version is from 2008 --> see below) but it did not resolve the error.

What strange to me is that I replaced the content of "config.guess + config.sub" with newest content:

-#! /bin/sh -# Attempt to guess a canonical system name. -# Copyright 1992-2024 Free Software Foundation, Inc.

-# shellcheck disable=SC2006,SC2268 # see below for rationale

-timestamp='2024-07-27'

but it still shows the wrong timestamp.

I made the lines wich I think affected bold, please help, thanks Sascha

Output:

Using logfile: hercules-buildall-2024-08-22-1.log Creating build cmds file: /home/sascha/Developer/mainframe/build-commands-2024-08-22-1.log Creating extra diagnostic info file: /home/sascha/Developer/mainframe/extra-info-2024-08-22-1.log Script version: /home/sascha/Developer/mainframe/hercules-helper/hercules-buildall.sh: v0.9.14-113-g2fd3218-dirty

Config file: /home/sascha/Developer/mainframe/hercules-helper/sdl-hyperion.conf

General Options: --trace : false --verbose : true --prompts : false --beeps : false --sudo : false --askpass : false --detect-only : false --no-packages : false --no-rexx : false --no-gitclone : false --no-bldlvlck : false --no-autogen : true --no-configure : false --no-clean : false --no-make : false --no-tests : false --no-install : false --no-setcap : false --no-envscript : false --no-bashrc : false

System information: uname -a : Linux armubuntu 6.8.0-41-generic #41-Ubuntu SMP PREEMPT_DYNAMIC Fri Aug 2 23:26:06 UTC 2024 aarch64 aarch64 aarch64 GNU/Linux uname -m : aarch64 uname -p : aarch64 uname -s : Linux

System detection: OS Type : Linux Machine Arch : aarch64 Memory Total (MB): 3903 Memory Free (MB): 1307 VERSION_ID : ubuntu VERSION_ID_LIKE : debian VERSION_PRETTY : Ubuntu 24.04 LTS VERSION_STR : 24.04 OS : debian variant OS Version : 24 Language : LANGUAGE=en_US:en LANG=en_US.UTF-8

Checking for Windows WSL2... nope Checking for Windows WSL1... nope

Platform Bitness : 64

[[ note: ]] Note: based on the selected options, your sudo password may be required.

Configuration: FLAVOR : sdl-hyperion Config file : /home/sascha/Developer/mainframe/hercules-helper/sdl-hyperion.conf CUSTOM_BUILD_MSG : "Built for you with Hercules-Helper" REPO_NAME : hyperion OPT_BUILD_DIR : /home/sascha/Developer/mainframe OPT_INSTALL_DIR : /home/sascha/Developer/mainframe/herc4x OPT_REGINA_DIR : Regina-REXX-3.6 OPT_REGINA_TARFILE : Regina-REXX-3.6.tar.gz OPT_REGINA_URL : https://gist.github.com/wrljet/053c3bab74910d42f8775841fcc6fd3f/raw/fe7d723509356ebb77d1eb4593f15dda941949da/Regina-REXX-3.6.tar.gz GIT_REPO_HERCULES : https://github.com/SDL-Hercules-390/hyperion.git [checkout develop] GIT_REPO_EXTPKGS : https://github.com/SDL-Hercules-390 [default branch]

Environment variables: Search Path : /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/snap/bin SUDO_ASKPASS : CC : cc : cc (Ubuntu 13.2.0-23ubuntu4) 13.2.0 GCC : CFLAGS : CPPFLAGS : LDFLAGS : LD_LIBRARY_PATH :

Performing Steps: run : Check for required system packages run : Include REXX support, build Regina REXX if needed run : Git clone Hercules and external packages run : Run bldlvlck run : Build Hercules external packages skip : Run autogen run : Run configure run : Run make clean run : Run make (compile and link) run : Run make check run : Run make install run : setcap executables run : Create script to set environment variables run : Add setting environment variables to bash profile

Existing build tools versions: autoconf : autoconf (GNU Autoconf) 2.71 automake : automake (GNU automake) 1.16.5 libtool : libtool (GNU libtool) 2.4.7 m4 : m4 (GNU M4) 1.4.19 make : GNU Make 4.3 compiler : cc (Ubuntu 13.2.0-23ubuntu4) 13.2.0 linker : GNU ld (GNU Binutils for Ubuntu) 2.42 gcc presence : /usr/bin/gcc g++ presence : /usr/bin/g++

Step: Create installation directory

Installation directory created: /home/sascha/Developer/mainframe/herc4x

Step: Check for required packages:

sudo apt-get update ... may take a while ... Checking for package: git ... is already installed Checking for package: wget ... is already installed Checking for package: curl ... is already installed Checking for package: time ... is already installed Checking for package: ncat ... is already installed Checking for package: build-essential ... is already installed Checking for package: cmake ... is already installed Checking for package: autoconf ... is already installed Checking for package: automake ... is already installed Checking for package: flex ... is already installed Checking for package: gawk ... is already installed Checking for package: m4 ... is already installed Checking for package: libltdl-dev ... is already installed Checking for package: libtool-bin ... is already installed Checking for package: libcap2-bin ... is already installed Checking for package: libbz2-dev ... is already installed Checking for package: zlib1g-dev ... is already installed

Step: Check REXX and compiler files:

REXX via ($PATH):

Checking for Regina-REXX... nope

Checking for ooRexx... nope

Processing started: Do 22 Aug 2024 10:05:41 CEST

Step: Build Regina Rexx [used for test scripts]:

% Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 1113k 100 1113k 0 0 1906k 0 --:--:-- --:--:-- --:--:-- 6255k ./configure --enable-64bit --libdir=/usr/lib

checking for one of the following C compilers: xlC xlc gcc cc c89 acc... using /usr/bin/gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed checking for library containing strerror... none required checking build system type... ./config.guess: unable to guess system type

This script, last modified 2008-03-12, 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 (./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 = 2008-03-12

uname -m = aarch64 uname -r = 6.8.0-41-generic uname -s = Linux uname -v = #41-Ubuntu SMP PREEMPT_DYNAMIC Fri Aug 2 23:26:06 UTC 2024

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

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

UNAME_MACHINE = aarch64 UNAME_RELEASE = 6.8.0-41-generic UNAME_SYSTEM = Linux UNAME_VERSION = #41-Ubuntu SMP PREEMPT_DYNAMIC Fri Aug 2 23:26:06 UTC 2024 configure: error: cannot guess build type; you must specify one [[ error: ]] configure failed! finish() called, exit status = 1

trigger2k20 commented 2 months ago

Since I try to run also a second instance in a container with ubuntu 24.04 I also got the same error. Could be a general problem try to run the hercules-helper script on Ubuntu with ARM architecture ?

Thanks for helping, Sascha

Output:

checking build system type... ./config.guess: unable to guess system type

This script, last modified 2008-03-12, 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 (./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 = 2008-03-12

uname -m = aarch64 uname -r = 6.1.25 uname -s = Linux uname -v = #1 SMP Fri Mar 29 11:57:58 CST 2024

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

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

UNAME_MACHINE = aarch64 UNAME_RELEASE = 6.1.25 UNAME_SYSTEM = Linux UNAME_VERSION = #1 SMP Fri Mar 29 11:57:58 CST 2024 configure: error: cannot guess build type; you must specify one [[ error: ]] configure failed! finish() called, exit status = 1

wrljet commented 2 months ago

Sascha,

The problem is in the Regina build step.

Please re-run and add the --no-rexx switch.
If things work smoothly, then I'll show you how to get it to use Regina 3.9 instead of 3.6.

Bill

trigger2k20 commented 2 months ago

Bill, thank you very much, now it runs compiles w/o error. Can this be fixed permanently ?

Now I am curious how to use Regina 3.9....

Beside of that I have a request: is it possible to build a switch which enables a root user to run the script ? I want to use a container and therefore i commented out this section in the "hercules-buildall.sh"

if [ "$EUID" -eq 0 ]; then echo # print a new line echo "Running this as root is dangerous and can cause misconfiguration issues" echo "or damage to your system. Run as a normal user, and the parts that need" echo "it will ask for your sudo password (if required)." echo # print a new line echo "For information, see:" echo "https://askubuntu.com/questions/16178/why-is-it-bad-to-log-in-as-root" echo "https://wiki.debian.org/sudo/" echo "https://phoenixnap.com/kb/how-to-create-add-sudo-user-centos" echo # print a new line read -p "Hit return to exit" -n 1 -r echo # print a new line exit 1 fi

Cloud be possible to deactivate this check via an switch like --root=yes ?

It would help a lot to built/update a container, thanks Sascha

wrljet commented 2 months ago

Yes, I'll add something for root.

trigger2k20 commented 2 months ago

Hi Bill, thanks !

Yu might also update the config.guess + config.sub wich still has the timestamp of 2008...

Sascha

wrljet commented 2 months ago

Sascha,

I've added a new --accept-root command line switch.

Try it out and let me know if it works.

Bill

wrljet commented 2 months ago

Sascha,

Hi Bill, thanks !

You might also update the config.guess + config.sub which still has the timestamp of 2008...

Sascha

The config.guess in SDL Hercules is fairly recent from the GNU project and has an internal timestamp of 2021.

The config.guess in the Hercules-Helper patch directory is also from 2021.

If you look at the Hercules-Helper default config file sdl-hyperion.conf, page down a ways, you will see:

# Regina download
opt_regina_dir="Regina-REXX-3.6"
opt_regina_tarfile="Regina-REXX-3.6.tar.gz"
opt_regina_url="https://gist.github.com/wrljet/053c3bab74910d42f8775841fcc6fd3f/raw/fe7d723509356ebb77d1eb4593f15dda941949da/Regina-REXX-3.6.tar.gz"
# opt_regina_dir="Regina-REXX-3.9.3"
# opt_regina_tarfile="Regina-REXX-3.9.3.tar.gz"
# opt_regina_url="https://gist.github.com/wrljet/dd19076064da7c3dea1aa9614fc37511/raw/e842479d63fae7af79d4aec467b8fdb148ca196a/Regina-REXX-3.9.3.tar.gz"

If you copy this file to your work/build directory, and use the --config= switch to point to it, and swap the commented lines between the Regina 3.6 and 3.9, things should work for you on your modern Arm system.

Bill

trigger2k20 commented 2 months ago

Bill,

thanks for your help & patience, regarding the new --accept-root command line switch -> its works !

Regarding the config.guess -> the timestamp 2008 comes when I do not use the --no-rexx switch ( and obviously the error comes as discussed above)

Output:

If the version you run (./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 = 2008-03-12 ... UNAME_VERSION = #1 SMP Fri Mar 29 11:57:58 CST 2024 configure: error: cannot guess build type; you must specify one [[ error: ]] configure failed! finish() called, exit status = 1

Regarding the REXX 3.9.3 -> I followed your suggestions added --config= & swap the commented lines but unfortunately it exits with an error.

Output:

REXX via ($PATH):

Checking for Regina-REXX... nope

Checking for ooRexx... nope

Processing started: Mon Aug 26 19:51:09 CET 2024

Step: Build Regina Rexx [used for test scripts]:

% Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 2692k 100 2692k 0 0 3856k 0 --:--:-- --:--:-- --:--:-- 3856k ./configure --enable-64bit --libdir=/usr/lib

checking for one of the following C compilers: clang xlc gcc c99 c89 acc cc... using /usr/bin/gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed checking for library containing strerror... none required checking build system type... aarch64-unknown-linux-gnu checking host system type... aarch64-unknown-linux-gnu checking target system type... aarch64-unknown-linux-gnu checking if compiler supports ANSI prototypes... yes configure: error: --enable-64bit cannot be specified on non-64bit OS. [[ error: ]] configure failed! finish() called, exit status = 1

Sascha

wrljet commented 2 months ago

Please zip up and send me the entire log.

atncsj6h commented 2 months ago

Hi Bill the latest config.guess has a timestamp of 2024-07-27 config.sub has a timestamp of 2024-05-27

you can download the config.guess repository from http://git.savannah.gnu.org/r/config.git enrico

wrljet commented 2 months ago

OK, I'll do that.

wrljet commented 2 months ago

Done. Only tested on x86 Debian, though.

atncsj6h commented 2 months ago

Hi Bill just to have everything in sync it would be useful to update the config.guess and the config.sub in the hyperion autoconf subdir e

trigger2k20 commented 2 months ago

Hi Bill, Sorry for the late response, here are the log files.

build-commands-2024-09-17.log extra-info-2024-09-17.log hercules-buildall-2024-09-17.log

Other point regarding root access: Can you expand the check and download section for programs also for the "sudo" command ? Reason: For containerizing - some base container OS do not have "sudo".

wrljet commented 2 months ago

Enrico,

Per your suggestion, I've updated config.{guess,sub} in the SDL-Hercules-390 repo as well. In commit https://github.com/SDL-Hercules-390/hyperion/commit/04bc6414420c96ab82b53df61b9e385006427df5

Bill

trigger2k20 commented 1 month ago

Hi Bill, did you have time to look at files that I sent late ? Sascha

wrljet commented 1 month ago

I certainly have had time, but no, I haven't looked at the logs yet.

config.{guess,sub} have been updated in both Hercules-Helper and SDL-Hercules, though.

Bill

trigger2k20 commented 1 month ago

Great, looking forward you have time looking at the logs.