2023-02-28

Slitaz64 - xfce-4.18 - slitaz

 

xfce-4.18 - slitaz



based on cooking64_new and

xfce-4.18 ( converted from slackware )

$ ldconfig -V
ldconfig (GNU libc) 2.36
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.
Written by Andreas Jaeger.

$ tazpkg

SliTaz package manager - Version: 962
=================================================
  Installed packages:    261
  Installed files:       17217
  Blocked packages:      0
  Upgradeable packages:  0

  Repository:            Main
  Last recharge:         never.
  Mirrored packages:     2516
=================================================

https://forum.slitaz.org/topic/slitaz-future/page/19#post-51400

2023-02-23

Slitaz64 - compiling and linking - toolchain

 

compiling and linking - toolchain

make clear, we are talking about the toolchain.

1.

/usr/lib/gcc/x86_64-slitaz-linux-gnu/12.2.0/crtend.o crtn.o
/usr/bin/ld: cannot find crt1.o: No such file or directory
/usr/bin/ld: cannot find crti.o: No such file or directory
collect2: error: ld returned 1 exit status

# tazpkg -sp crt1.o
Search result for package "crt1.o"
glibc-dev

# tazpkg -lf glibc-dev | grep crt[1in].o
/usr/lib64/Mcrt1.o
/usr/lib64/Scrt1.o
/usr/lib64/crt1.o
/usr/lib64/crti.o
/usr/lib64/crtn.o
/usr/lib64/gcrt1.o
/usr/lib64/grcrt1.o
/usr/lib64/rcrt1.o

2.

echo 'int main(){}' | gcc -xc -

> # echo 'int main() { return 0; }' > test.c
> # gcc -v -o test.o test.c

ensure that the basic functions (compiling and linking) of the toolchain are working as expected.
If everything is working correctly, there should be no errors,

3.

8.5.1. Installation of Glibc

Prepare Glibc for compilation:
../configure --prefix=/usr \
--disable-werror \
--enable-kernel=3.2 \
--enable-stack-protector=strong \
--with-headers=/usr/include \
libc_cv_slibdir=/usr/lib

The meaning of the configure options:
[..]
libc_cv_slibdir=/usr/lib
This variable sets the correct library for all systems. We do not want lib64 to be used.

8.5.2.3. Configuring the Dynamic Loader
By default, the dynamic loader (/lib/ld-linux.so.2) searches through /usr/lib for dynamic libraries that are needed by programs as they are run. However, if there are libraries in directories other than /usr/lib, these need to be added to the /etc/ld.so.conf file in order for the dynamic loader to find them. 
Two directories that are commonly known to contain additional libraries are /usr/local/lib and /opt/lib, so add those directories to the dynamic loader's search path.

more details..
https://www.linuxfromscratch.org/lfs/view/11.2/chapter08/glibc.html#contents-glibc

https://www.linuxfromscratch.org/lfs/view/11.2/chapter05/glibc.html


https://forum.slitaz.org/topic/slitaz-future/page/18#post-51394 

2023-02-20

Slitaz64 - echo 'int main(){}' | gcc -xc -


echo 'int main(){}' | gcc -xc -

> # echo 'int main() { return 0; }' > test.c

> # gcc -v -o test.o test.c

> See `config.log' for more details

1. config.log
$ grep -A10 int config.log

| int
| main ()
| {
|
| ;
| return 0;
| }
configure:3505: error: in `/home/slitaz/wok/xorg-xf86-video-amdgpu/source/xorg-xf86-video-amdgpu-22.0.0':
configure:3507: error: C compiler cannot create executables
See `config.log' for more details.

2. Installation of Glibc

Caution

At this point, it is imperative to stop and ensure that the basic functions (compiling and linking) of the new toolchain are working as expected. To perform a sanity check, run the following commands:

echo 'int main(){}' | gcc -xc -
readelf -l a.out | grep ld-linux

If everything is working correctly, there should be no errors, and the output of the last command will be of the form:

[Requesting program interpreter: /lib64/ld-linux-x86-64.so.2]

Note that for 32-bit machines, the interpreter name will be /lib/ld-linux.so.2.

If the output is not shown as above or there was no output at all, then something is wrong. Investigate and retrace the steps to find out where the problem is and correct it. This issue must be resolved before continuing on.

Once all is well, clean up the test file:

rm -v a.out

https://www.linuxfromscratch.org/lfs/view/11.2/chapter05/glibc.html


https://forum.slitaz.org/topic/slitaz-future/page/18#post-51392

2023-02-16

slitaz64 - LIBRARY_PATH

 

LIBRARY_PATH
configure: error: C compiler cannot create executables

checking for x86_64-slitaz-linux-gcc... no
checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in `/home/slitaz/wok/xorg-xf86-video-amdgpu/source/xorg-xf86-video-amdgpu-22.0.0':
configure: error: C compiler cannot create executables
See `config.log' for more details  -  Attachments  config.log  12.2 KB

slitaz-toolchain - isl version none

GNU C17 (SliTaz) version 8.2.0 (i486-slitaz-linux)
compiled by GNU C version 8.2.0, GMP version 6.1.2, MPFR version 4.0.1, MPC version 1.1.0, isl version none

$ echo 'int main() { return 0; }' > test.c

$ gcc -v -o test.o test.c

https://forum.slitaz.org/topic/slitaz-next-41485/page/2#post-49031

https://forum.slitaz.org/topic/update-kernel-1/page/3#post-48139 


1.
root@slitaz:~# gcc -v

Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-slitaz-linux-gnu/12.2.0/lto-wrapper
Target: x86_64-slitaz-linux-gnu
Configured with: /home/slitaz/wok/gcc/source/gcc-12.2.0/configure --libexecdir=/usr/lib --disable-multilib --disable-bootstrap --with-system-zlib --enable-nls --enable-languages=c,c++,objc,fortran --enable-shared --enable-clocale=gnu --enable-objc-gc --enable-__cxa_atexit --enable-lto --enable-threads=posix --with-pkgversion=SliTaz --build=x86_64-slitaz-linux-gnu --target=x86_64-slitaz-linux-gnu
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 12.2.0 (SliTaz)

2.
root@slitaz:~# echo 'int main() { return 0; }' > test.c

root@slitaz:~# gcc -v -o test.o test.c
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-slitaz-linux-gnu/12.2.0/lto-wrapper
Target: x86_64-slitaz-linux-gnu
Configured with: /home/slitaz/wok/gcc/source/gcc-12.2.0/configure --libexecdir=/usr/lib --disable-multilib --disable-bootstrap --with-system-zlib --enable-nls --enable-languages=c,c++,objc,fortran --enable-shared --enable-clocale=gnu --enable-objc-gc --enable-__cxa_atexit --enable-lto --enable-threads=posix --with-pkgversion=SliTaz --build=x86_64-slitaz-linux-gnu --target=x86_64-slitaz-linux-gnu
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 12.2.0 (SliTaz)
COLLECT_GCC_OPTIONS='-v' '-o' 'test.o' '-mtune=generic' '-march=x86-64' '-dumpdir' 'test.o-'
/usr/lib/gcc/x86_64-slitaz-linux-gnu/12.2.0/cc1 -quiet -v test.c -quiet -dumpdir test.o- -dumpbase test.c -dumpbase-ext .c -mtune=generic -march=x86-64 -version -o /tmp/ccMbr0oH.s
/usr/lib/gcc/x86_64-slitaz-linux-gnu/12.2.0/cc1: error while loading shared libraries: libisl.so.23: cannot open shared object file: No such file or directory

3.
root@slitaz:~# tazpkg -gi isl

root@slitaz:~# gcc -v -o test.o test.c
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-slitaz-linux-gnu/12.2.0/lto-wrapper
Target: x86_64-slitaz-linux-gnu

[..]

COLLECT_GCC_OPTIONS='-v' '-o' 'test.o' '-mtune=generic' '-march=x86-64' '-dumpdir' 'test.o.'
/usr/lib/gcc/x86_64-slitaz-linux-gnu/12.2.0/collect2 -plugin /usr/lib/gcc/x86_64-slitaz-linux-gnu/12.2.0/liblto_plugin.so -plugin-opt=/usr/lib/gcc/x86_64-slitaz-linux-gnu/12.2.0/lto-wrapper -plugin-opt=-fresolution=/tmp/cc74BPIu.res -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s --eh-frame-hdr -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 -o test.o crt1.o crti.o /usr/lib/gcc/x86_64-slitaz-linux-gnu/12.2.0/crtbegin.o -L/usr/lib/gcc/x86_64-slitaz-linux-gnu/12.2.0 -L/usr/lib/gcc/x86_64-slitaz-linux-gnu/12.2.0/../../../../lib -L/lib/../lib -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-slitaz-linux-gnu/12.2.0/../../.. /tmp/ccvjJ66F.o -lgcc --push-state --as-needed -lgcc_s --pop-state -lc -lgcc --push-state --as-needed -lgcc_s --pop-state
/usr/lib/gcc/x86_64-slitaz-linux-gnu/12.2.0/crtend.o crtn.o
/usr/bin/ld: cannot find crt1.o: No such file or directory
/usr/bin/ld: cannot find crti.o: No such file or directory
collect2: error: ld returned 1 exit status

4.
root@slitaz:~# find /usr/ -name crt?.o

/usr/lib64/crt1.o
/usr/lib64/crti.o
/usr/lib64/crtn.o

root@slitaz:~# ln -s /usr/lib64/crt1.o /usr/lib/.
root@slitaz:~# ln -s /usr/lib64/crtl.o /usr/lib/.
root@slitaz:~# ln -s /usr/lib64/crti.o /usr/lib/.

root@slitaz:~# tazpkg -sp crt1.o

Search result for package "crt1.o"
===============================================================
glibc-dev
musl-libc-dev
===============================================================
2 packages

5.
root@slitaz:~# gcc -v -o test.o test.c

Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-slitaz-linux-gnu/12.2.0/lto-wrapper
Target: x86_64-slitaz-linux-gnu
Configured with: /home/slitaz/wok/gcc/source/gcc-12.2.0/configure --libexecdir=/usr/lib --disable-multilib --disable-bootstrap --with-system-zlib --enable-nls --enable-languages=c,c++,objc,fortran --enable-shared --enable-clocale=gnu --enable-objc-gc --enable-__cxa_atexit --enable-lto --enable-threads=posix --with-pkgversion=SliTaz --build=x86_64-slitaz-linux-gnu --target=x86_64-slitaz-linux-gnu
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 12.2.0 (SliTaz)
COLLECT_GCC_OPTIONS='-v' '-o' 'test.o' '-mtune=generic' '-march=x86-64' '-dumpdir' 'test.o-'
/usr/lib/gcc/x86_64-slitaz-linux-gnu/12.2.0/cc1 -quiet -v test.c -quiet -dumpdir test.o- -dumpbase test.c -dumpbase-ext .c -mtune=generic -march=x86-64 -version -o /tmp/ccr2oPU8.s
GNU C17 (SliTaz) version 12.2.0 (x86_64-slitaz-linux-gnu)
compiled by GNU C version 12.2.0, GMP version 6.2.1, MPFR version 4.1.0, MPC version 1.2.1, isl version isl-0.24-GMP

GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=65536
ignoring nonexistent directory "/usr/local/include"
ignoring nonexistent directory "/usr/lib/gcc/x86_64-slitaz-linux-gnu/12.2.0/../../../../x86_64-slitaz-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
/usr/lib/gcc/x86_64-slitaz-linux-gnu/12.2.0/include
/usr/lib/gcc/x86_64-slitaz-linux-gnu/12.2.0/include-fixed
/usr/include
End of search list.
GNU C17 (SliTaz) version 12.2.0 (x86_64-slitaz-linux-gnu)
compiled by GNU C version 12.2.0, GMP version 6.2.1, MPFR version 4.1.0, MPC version 1.2.1, isl version isl-0.24-GMP

GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=65536
Compiler executable checksum: 3a8d01156457c23734b0a8c87475536a
COLLECT_GCC_OPTIONS='-v' '-o' 'test.o' '-mtune=generic' '-march=x86-64' '-dumpdir' 'test.o-'
as -v --64 -o /tmp/cc1rbU3x.o /tmp/ccr2oPU8.s
GNU assembler version 2.39 (x86_64-pc-linux-gnu) using BFD version (GNU Binutils) 2.39
COMPILER_PATH=/usr/lib/gcc/x86_64-slitaz-linux-gnu/12.2.0/:/usr/lib/gcc/x86_64-slitaz-linux-gnu/12.2.0/:/usr/lib/gcc/x86_64-slitaz-linux-gnu/:/usr/lib/gcc/x86_64-slitaz-linux-gnu/12.2.0/:/usr/lib/gcc/x86_64-slitaz-linux-gnu/
LIBRARY_PATH=/usr/lib/gcc/x86_64-slitaz-linux-gnu/12.2.0/:/usr/lib/gcc/x86_64-slitaz-linux-gnu/12.2.0/../../../../lib/:/lib/../lib/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-slitaz-linux-gnu/12.2.0/../../../:/lib/:/usr/lib/
COLLECT_GCC_OPTIONS='-v' '-o' 'test.o' '-mtune=generic' '-march=x86-64' '-dumpdir' 'test.o.'
/usr/lib/gcc/x86_64-slitaz-linux-gnu/12.2.0/collect2 -plugin /usr/lib/gcc/x86_64-slitaz-linux-gnu/12.2.0/liblto_plugin.so -plugin-opt=/usr/lib/gcc/x86_64-slitaz-linux-gnu/12.2.0/lto-wrapper -plugin-opt=-fresolution=/tmp/ccqlrHHN.res -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s --eh-frame-hdr -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 -o test.o /usr/lib/gcc/x86_64-slitaz-linux-gnu/12.2.0/../../../../lib/crt1.o /usr/lib/gcc/x86_64-slitaz-linux-gnu/12.2.0/../../../../lib/crti.o /usr/lib/gcc/x86_64-slitaz-linux-gnu/12.2.0/crtbegin.o -L/usr/lib/gcc/x86_64-slitaz-linux-gnu/12.2.0 -L/usr/lib/gcc/x86_64-slitaz-linux-gnu/12.2.0/../../../../lib -L/lib/../lib -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-slitaz-linux-gnu/12.2.0/../../.. /tmp/cc1rbU3x.o -lgcc --push-state --as-needed -lgcc_s --pop-state -lc -lgcc --push-state --as-needed -lgcc_s --pop-state /usr/lib/gcc/x86_64-slitaz-linux-gnu/12.2.0/crtend.o /usr/lib/gcc/x86_64-slitaz-linux-gnu/12.2.0/../../../../lib/crtn.o
COLLECT_GCC_OPTIONS='-v' '-o' 'test.o' '-mtune=generic' '-march=x86-64' '-dumpdir' 'test.o.'

6.
root@slitaz:~# file test.o

test.o: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 3.2.0, with debug_info, not stripped
root@slitaz:~#

Attachments

  1. config.log  12.2 KB

 

https://forum.slitaz.org/topic/slitaz-future/page/18#post-51386

 

2023-02-06