You are not logged in.
Background: I know mips assembly and would like to be able to assemble my C code in it, and then debut mips assembly. I'm not a fan of aarch64 or x86. I will learn them some other day.
I have first tried to just yay -S install mips gcc. Didn't work
so here's all the one I git cloned and then makepkg -si:
~/Download> ls
mips64-linux-gnu-binutils mips64-linux-gnu-gcc mips64-linux-gnu-gcc-bootstrap mips64-linux-gnu-glibc mips64-linux-gnu-linux-api-headers
So:
mips64-linux-gnu-gcc-bootstrap , mips64-linux-gnu-linux-api-headers, mips64-linux-gnu-binutils are correctly installed.
Now I need to install gnu-glibc before i can install gnu-gcc:
francois@DesktopArchBTW ~/D/mips64-linux-gnu-glibc (master)> makepkg -si
==> Making package: mips64-linux-gnu-glibc 2.36-1 (Mon 12 Aug 2024 07:31:35 PM)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
-> Found glibc-2.36.tar.xz
-> Found glibc-2.36.tar.xz.sig
-> Found sdt-config.h
-> Found sdt.h
==> Validating source files with sha256sums...
glibc-2.36.tar.xz ... Passed
glibc-2.36.tar.xz.sig ... Skipped
sdt-config.h ... Passed
sdt.h ... Passed
==> Verifying source file signatures with gpg...
glibc-2.36.tar.xz ... Passed (WARNING: the key has expired.)
==> WARNING: Warnings have occurred while verifying the signatures.
Please make sure you really trust them.
==> Extracting sources...
-> Extracting glibc-2.36.tar.xz with bsdtar
==> Starting prepare()...
==> Removing existing $pkgdir/ directory...
==> Starting build()...
checking build system type... x86_64-pc-linux-gnu
checking host system type... mips64-unknown-linux-gnu
checking for mips64-linux-gnu-gcc... mips64-linux-gnu-gcc -mabi=64 -I/home/francois/Downloads/mips64-linux-gnu-glibc/src
checking for suffix of object files... configure: error: in `/home/francois/Downloads/mips64-linux-gnu-glibc/src/build-abi-64':
configure: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details
==> ERROR: A failure occurred in build().
Aborting...
Here is the output from config-log:
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by GNU C Library configure (see version.h), which was
generated by GNU Autoconf 2.69. Invocation command line was
$ /home/francois/Downloads/mips64-linux-gnu-glibc/src/glibc-2.36/configure --libdir=/lib/glibc/abi-64 --libexecdir=/lib/glibc/abi-64 --build=x86_64-pc-linux-gnu --host=mips64-linux-gnu --target=mips64-linux-gnu --prefix=/usr --includedir=/include --with-headers=/usr/mips64-linux-gnu/include --enable-add-ons --enable-bind-now --disable-cet --enable-kernel=4.4 --enable-lock-elision --disable-multi-arch --enable-stack-protector=strong --enable-stackguard-randomization --disable-static-pie --enable-systemtap --disable-profile --disable-werror
## --------- ##
## Platform. ##
## --------- ##
hostname = DesktopArchBTW
uname -m = x86_64
uname -r = 6.10.3-arch1-2
uname -s = Linux
uname -v = #1 SMP PREEMPT_DYNAMIC Tue, 06 Aug 2024 07:21:19 +0000
/usr/bin/uname -p = unknown
/bin/uname -X = unknown
/bin/arch = unknown
/usr/bin/arch -k = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo = unknown
/bin/machine = unknown
/usr/bin/oslevel = unknown
/bin/universe = unknown
PATH: /home/francois/.config/polybar/
PATH: /home/francois/.config/polybar.old/
PATH: /home/francois/.config/conky
PATH: /home/francois/miniconda3/bin
PATH: /home/francois/Pictures/Slideshow_Scripts/Parent
PATH: /home/francois/Pictures/Slideshow_Scripts/Master
PATH: /home/francois/Pictures/Slideshow_Scripts/Utils
PATH: /home/francois/Videos/Animated_Background/
PATH: /home/francois/Music
PATH: /home/francois/.config/tmux
PATH: /home/francois/.config/rofi/applets/bin
PATH: /home/francois/.config/rofi/scripts
PATH: /home/francois/go/bin
PATH: /home/francois/Videos/i3-video-wallpaper-main/
PATH: /home/francois/Pictures
PATH: /home/francois/Network
PATH: /home/francois/WindowsFileSystem
PATH: /home/francois/QolScripts
PATH: /home/francois/Documents/Linux Documents/University (real)
PATH: /home/francois
PATH: /home/francois/.config/polybar/
PATH: /home/francois/.config/polybar.old/
PATH: /home/francois/.config/conky
PATH: /home/francois/miniconda3/bin
PATH: /home/francois/Pictures/Slideshow_Scripts/Parent
PATH: /home/francois/Pictures/Slideshow_Scripts/Master
PATH: /home/francois/Pictures/Slideshow_Scripts/Utils
PATH: /home/francois/Videos/Animated_Background/
PATH: /home/francois/Music
PATH: /home/francois/.config/tmux
PATH: /home/francois/.config/rofi/applets/bin
PATH: /home/francois/.config/rofi/scripts
PATH: /home/francois/go/bin
PATH: /home/francois/Videos/i3-video-wallpaper-main/
PATH: /home/francois/Pictures
PATH: /home/francois/Network
PATH: /home/francois/WindowsFileSystem
PATH: /home/francois/QolScripts
PATH: /home/francois/Documents/Linux Documents/University (real)
PATH: /home/francois
PATH: /usr/local/sbin
PATH: /usr/local/bin
PATH: /usr/bin
PATH: /var/lib/flatpak/exports/bin
PATH: /usr/bin/site_perl
PATH: /usr/bin/vendor_perl
PATH: /usr/bin/core_perl
PATH: /opt/rocm/bin
## ----------- ##
## Core tests. ##
## ----------- ##
configure:2251: checking build system type
configure:2265: result: x86_64-pc-linux-gnu
configure:2285: checking host system type
configure:2298: result: mips64-unknown-linux-gnu
configure:2327: checking for mips64-linux-gnu-gcc
configure:2354: result: mips64-linux-gnu-gcc -mabi=64 -I/home/francois/Downloads/mips64-linux-gnu-glibc/src
configure:2623: checking for C compiler version
configure:2632: mips64-linux-gnu-gcc -mabi=64 -I/home/francois/Downloads/mips64-linux-gnu-glibc/src --version >&5
mips64-linux-gnu-gcc (GCC) 12.2.0
Copyright (C) 2022 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
configure:2643: $? = 0
configure:2632: mips64-linux-gnu-gcc -mabi=64 -I/home/francois/Downloads/mips64-linux-gnu-glibc/src -v >&5
Using built-in specs.
COLLECT_GCC=mips64-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/mips64-linux-gnu/12.2.0/lto-wrapper
Target: mips64-linux-gnu
Configured with: /home/francois/Downloads/mips64-linux-gnu-gcc-bootstrap/src/gcc-12.2.0/configure --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --target=mips64-linux-gnu --prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --with-sysroot=/usr/mips64-linux-gnu --with-build-sysroot=/usr/mips64-linux-gnu --with-native-system-header-dir=/include --with-abi=64 --with-newlib --with-gnu-as --with-gnu-ld --enable-languages=c,c++ --with-isl --with-linker-hash-style=gnu --with-system-zlib --enable-__cxa_atexit --enable-cet=auto --enable-checking=release --enable-clocale=newlib --disable-default-pie --enable-default-ssp --enable-gnu-indirect-function --enable-gnu-unique-object --enable-install-libiberty --enable-linker-build-id --enable-lto --enable-multilib --enable-plugin --disable-shared --disable-threads --disable-libssp --disable-libstdcxx-pch --disable-libunwind-exceptions --disable-werror
Thread model: single
Supported LTO compression algorithms: zlib zstd
gcc version 12.2.0 (GCC)
configure:2643: $? = 0
configure:2632: mips64-linux-gnu-gcc -mabi=64 -I/home/francois/Downloads/mips64-linux-gnu-glibc/src -V >&5
mips64-linux-gnu-gcc: error: unrecognized command-line option '-V'
mips64-linux-gnu-gcc: fatal error: no input files
compilation terminated.
configure:2643: $? = 1
configure:2632: mips64-linux-gnu-gcc -mabi=64 -I/home/francois/Downloads/mips64-linux-gnu-glibc/src -qversion >&5
mips64-linux-gnu-gcc: error: unrecognized command-line option '-qversion'; did you mean '--version'?
mips64-linux-gnu-gcc: fatal error: no input files
compilation terminated.
configure:2643: $? = 1
configure:2648: checking for suffix of object files
configure:2670: mips64-linux-gnu-gcc -mabi=64 -I/home/francois/Downloads/mips64-linux-gnu-glibc/src -c -O2 -pipe -fexceptions -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security -fstack-clash-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -g -ffile-prefix-map=/home/francois/Downloads/mips64-linux-gnu-glibc/src=/usr/src/debug/mips64-linux-gnu-glibc conftest.c >&5
mips64-linux-gnu-gcc: error: unrecognized command-line option '-mno-omit-leaf-frame-pointer'; did you mean '-fno-omit-frame-pointer'?
configure:2674: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "GNU C Library"
| #define PACKAGE_TARNAME "glibc"
| #define PACKAGE_VERSION "(see version.h)"
| #define PACKAGE_STRING "GNU C Library (see version.h)"
| #define PACKAGE_BUGREPORT "https://sourceware.org/bugzilla/"
| #define PACKAGE_URL "https://www.gnu.org/software/glibc/"
| #define PKGVERSION "(GNU libc) "
| #define REPORT_BUGS_TO "<https://www.gnu.org/software/libc/bugs.html>"
| /* end confdefs.h. */
|
| int
| main ()
| {
|
| ;
| return 0;
| }
configure:2688: error: in `/home/francois/Downloads/mips64-linux-gnu-glibc/src/build-abi-64':
configure:2690: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details
## ---------------- ##
## Cache variables. ##
## ---------------- ##
ac_cv_build=x86_64-pc-linux-gnu
ac_cv_env_CCC_set=
ac_cv_env_CCC_value=
ac_cv_env_CC_set=set
ac_cv_env_CC_value='mips64-linux-gnu-gcc -mabi=64 -I/home/francois/Downloads/mips64-linux-gnu-glibc/src'
ac_cv_env_CFLAGS_set=set
ac_cv_env_CFLAGS_value=' -O2 -pipe -fexceptions -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security -fstack-clash-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -g -ffile-prefix-map=/home/francois/Downloads/mips64-linux-gnu-glibc/src=/usr/src/debug/mips64-linux-gnu-glibc'
ac_cv_env_CPPFLAGS_set=
ac_cv_env_CPPFLAGS_value=
ac_cv_env_CPP_set=
ac_cv_env_CPP_value=
ac_cv_env_CXXFLAGS_set=set
ac_cv_env_CXXFLAGS_value=' -O2 -pipe -fexceptions -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security -fstack-clash-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -Wp,-D_GLIBCXX_ASSERTIONS -g -ffile-prefix-map=/home/francois/Downloads/mips64-linux-gnu-glibc/src=/usr/src/debug/mips64-linux-gnu-glibc'
ac_cv_env_CXX_set=set
ac_cv_env_CXX_value='mips64-linux-gnu-g++ -mabi=64 -I/home/francois/Downloads/mips64-linux-gnu-glibc/src'
ac_cv_env_LDFLAGS_set=set
ac_cv_env_LDFLAGS_value='-Wl,-O1 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl -Wl,-z,pack-relative-relocs'
ac_cv_env_LIBS_set=
ac_cv_env_LIBS_value=
ac_cv_env_build_alias_set=set
ac_cv_env_build_alias_value=x86_64-pc-linux-gnu
ac_cv_env_host_alias_set=set
ac_cv_env_host_alias_value=mips64-linux-gnu
ac_cv_env_target_alias_set=set
ac_cv_env_target_alias_value=mips64-linux-gnu
ac_cv_host=mips64-unknown-linux-gnu
ac_cv_prog_CC='mips64-linux-gnu-gcc -mabi=64 -I/home/francois/Downloads/mips64-linux-gnu-glibc/src'
## ----------------- ##
## Output variables. ##
## ----------------- ##
AR='mips64-linux-gnu-ar'
AS=''
ASFLAGS_config=''
AUTOCONF=''
AWK=''
BASH_SHELL=''
BISON=''
BUILD_CC='gcc'
CC='mips64-linux-gnu-gcc -mabi=64 -I/home/francois/Downloads/mips64-linux-gnu-glibc/src'
CFLAGS=' -O2 -pipe -fexceptions -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security -fstack-clash-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -g -ffile-prefix-map=/home/francois/Downloads/mips64-linux-gnu-glibc/src=/usr/src/debug/mips64-linux-gnu-glibc'
CPP=''
CPPFLAGS=''
CPPUNDEFS=''
CXX='mips64-linux-gnu-g++ -mabi=64 -I/home/francois/Downloads/mips64-linux-gnu-glibc/src'
CXXFLAGS=' -O2 -pipe -fexceptions -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security -fstack-clash-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -Wp,-D_GLIBCXX_ASSERTIONS -g -ffile-prefix-map=/home/francois/Downloads/mips64-linux-gnu-glibc/src=/usr/src/debug/mips64-linux-gnu-glibc'
CXX_BITS_STD_ABS_H=''
CXX_CMATH_HEADER=''
CXX_CSTDLIB_HEADER=''
CXX_SYSINCLUDES=''
DEFINES=''
DEFS=''
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
GPROF=''
INSTALL_DATA=''
INSTALL_INFO=''
INSTALL_PROGRAM=''
INSTALL_SCRIPT=''
LD=''
LDFLAGS='-Wl,-O1 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl -Wl,-z,pack-relative-relocs'
LIBGD=''
LIBOBJS=''
LIBS=''
LN_S=''
LTLIBOBJS=''
MAKE=''
MAKEINFO=''
MSGFMT=''
NM=''
OBJCOPY=''
OBJDUMP=''
OBJEXT=''
PACKAGE_BUGREPORT='https://sourceware.org/bugzilla/'
PACKAGE_NAME='GNU C Library'
PACKAGE_STRING='GNU C Library (see version.h)'
PACKAGE_TARNAME='glibc'
PACKAGE_URL='https://www.gnu.org/software/glibc/'
PACKAGE_VERSION='(see version.h)'
PATH_SEPARATOR=':'
PERL=''
PKGVERSION='(GNU libc) '
PKGVERSION_TEXI='(GNU libc) '
PYTHON=''
PYTHON_PROG=''
READELF=''
RELEASE=''
REPORT_BUGS_TEXI='@uref{https://www.gnu.org/software/libc/bugs.html}'
REPORT_BUGS_TO='<https://www.gnu.org/software/libc/bugs.html>'
SED=''
SHELL='/bin/sh'
SYSINCLUDES=''
VERSION=''
ac_ct_CC=''
ac_ct_CXX=''
all_warnings=''
base_machine=''
bindir='${exec_prefix}/bin'
bindnow=''
build='x86_64-pc-linux-gnu'
build_alias='x86_64-pc-linux-gnu'
build_cpu='x86_64'
build_crypt=''
build_nscd=''
build_os='linux-gnu'
build_pt_chown=''
build_vendor='pc'
cross_compiling='yes'
datadir='${datarootdir}'
datarootdir='${prefix}/share'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
dvidir='${docdir}'
enable_timezone_tools=''
enable_werror='no'
exec_prefix='NONE'
experimental_malloc=''
extra_nonshared_cflags=''
force_install=''
hardcoded_path_in_tests=''
have_libaudit=''
have_libcap=''
have_selinux=''
have_tunables=''
host='mips64-unknown-linux-gnu'
host_alias='mips64-linux-gnu'
host_cpu='mips64'
host_os='linux-gnu'
host_vendor='unknown'
htmldir='${docdir}'
includedir='/include'
infodir='${datarootdir}/info'
ldd_rewrite_script=''
libc_cv_cc_loop_to_function=''
libc_cv_cc_nofma=''
libc_cv_cc_submachine=''
libc_cv_cc_with_libunwind=''
libc_cv_complocaledir=''
libc_cv_cxx_thread_local=''
libc_cv_fpie=''
libc_cv_gcc_unwind_find_fde=''
libc_cv_has_glob_dat=''
libc_cv_insert=''
libc_cv_localstatedir=''
libc_cv_mtls_dialect_gnu2=''
libc_cv_multidir=''
libc_cv_nss_crypt=''
libc_cv_protected_data=''
libc_cv_rootsbindir=''
libc_cv_rtlddir=''
libc_cv_slibdir=''
libc_cv_ssp=''
libc_cv_static_nss_crypt=''
libc_cv_sysconfdir=''
libc_cv_textrel_ifunc=''
libc_cv_with_fp=''
libc_cv_z_execstack=''
libc_extra_cflags=''
libc_extra_cppflags=''
libdir='/lib/glibc/abi-64'
libexecdir='/lib/glibc/abi-64'
localedir='${datarootdir}/locale'
localstatedir='${prefix}/var'
mach_interface_list=''
mandir='${datarootdir}/man'
memory_tagging=''
multi_arch=''
no_stack_protector=''
oldincludedir='/usr/include'
pdfdir='${docdir}'
prefix='/usr'
profile=''
program_transform_name='s,x,x,'
psdir='${docdir}'
pthread_in_libc=''
rtld_early_cflags=''
sbindir='${exec_prefix}/sbin'
shared=''
sharedstatedir='${prefix}/com'
stack_protector=''
static=''
static_nss=''
subdirs=' '
submachine=''
sysconfdir='${prefix}/etc'
sysheaders=''
sysnames=''
target_alias='mips64-linux-gnu'
use_default_link=''
use_ldconfig=''
use_nscd=''
## ----------- ##
## confdefs.h. ##
## ----------- ##
/* confdefs.h */
#define PACKAGE_NAME "GNU C Library"
#define PACKAGE_TARNAME "glibc"
#define PACKAGE_VERSION "(see version.h)"
#define PACKAGE_STRING "GNU C Library (see version.h)"
#define PACKAGE_BUGREPORT "https://sourceware.org/bugzilla/"
#define PACKAGE_URL "https://www.gnu.org/software/glibc/"
#define PKGVERSION "(GNU libc) "
#define REPORT_BUGS_TO "<https://www.gnu.org/software/libc/bugs.html>"
configure: exit 1
Offline
Likewise, I'd like to install qemu-mips. yay -S qemu-arch-extra failed
Offline
The default CFLAGS in makepkg.conf don't work with the compiler you're using.
FTR, your issue is with building a package, not with installing a package. Two totally separate functions.
And please, use code tags around output like this.
Last edited by Scimmia (2024-08-13 02:02:53)
Offline
Exact same issue for me.
What about the CFLAGS to modify?
==> Création du paquet mips64-linux-gnu-glibc 2.36-1 (mar. 13 août 2024 22:44:33)
==> Vérification des dépendances pour l’exécution…
==> Vérification des dépendances pour la compilation…
==> Récupération des sources…
-> glibc-2.36.tar.xz trouvé
-> glibc-2.36.tar.xz.sig trouvé
-> sdt-config.h trouvé
-> sdt.h trouvé
==> Validation des fichiers source avec sha256sums…
glibc-2.36.tar.xz ... Réussite
glibc-2.36.tar.xz.sig ... Ignoré
sdt-config.h ... Réussite
sdt.h ... Réussite
==> Vérification des signatures des fichiers sources grâce à gpg…
glibc-2.36.tar.xz ... Réussite (ATTENTION : la clé a expiré.)
==> ATTENTION : Des messages destinés à attirer votre attention sont apparus lors de la vérification des signatures.
Veuillez vous assurer que vous leur faites confiance.
==> Extraction des sources…
-> Extraction de glibc-2.36.tar.xz avec bsdtar
==> Lancement de prepare()…
==> Lancement de build()…
checking build system type... x86_64-pc-linux-gnu
checking host system type... mips64-unknown-linux-gnu
checking for mips64-linux-gnu-gcc... mips64-linux-gnu-gcc -mabi=64 -I/home/divingeek/sources/deps/mips64-linux-gnu-glibc/src
checking for suffix of object files... configure: error: in `/home/divingeek/sources/deps/mips64-linux-gnu-glibc/src/build-abi-64':
configure: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details
Offline
How to add code flag, tree ticks ?
```
printf("Hello world!\n");
```
<code>
printf("Hello world!\n");
<code>
What configure flag should I use?
`print("hello")`
Last edited by PoutineErable (2024-08-14 03:47:45)
Offline
How to add code flag, tree ticks ?
[code] some code [/code] Offline
Jeez, the gcc this package provides is old. You should patch it to newer gcc or adjust CFLAGS as @Scimmia said (these CFLAGS "leak" down to old gcc you built).
Alternatively, you can go with "zig cc", as it is just LLVM, but you don't have to worry about crt0 and libc.
$ zig cc -target mips64-linux-gnuabi64 test.c
$ file a.out
a.out: ELF 64-bit MSB executable, MIPS, MIPS64 version 1 (SYSV), dynamically linked, interpreter /lib64/ld.so.1, for GNU/Linux 2.0.0, with debug_info, not stripped(Of course, it works with assembler, and you can emit listings with -S.)
EDIT:
Likewise, I'd like to install qemu-mips. yay -S qemu-arch-extra failed
$ pacman -Ss qemu mips
extra/qemu-system-mips 9.0.2-1
QEMU system emulator for MIPSLast edited by yataro (2024-08-14 17:24:29)
Offline