LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 12-23-2022, 03:47 AM   #31
lucabon
Member
 
Registered: Oct 2021
Location: Italy
Distribution: Slackware
Posts: 104

Rep: Reputation: 74

Porting of Slackware-current to loongarch64 completed: https://bonslack.org/bonslack_loongarch64-current/

Missing packages (architecture not supported):
- clisp
- gc
- guile
- libunwind
- libseccomp
- poke
- rust and related (cbindgen, rust-bindgen, cargo-vendor-filterer, mozjs78, gjs, mozilla*, seamonkey)
- KDE packages linked to QtWebEngine (akonadi-import-wizard, akonadiconsole, akregator, cantor, digikam, falkon, grantlee-editor, kalendar, kdepim-addons, kimagemapeditor, kmail, kmymoney, konqueror, kontact, libksieve, mailcommon, mbox-importer, messagelib, parley, pim-data-exporter, pim-sieve-editor)

Downgraded/upgraded packages:
- libsrvg (2.40.21, the last without rust)
- polkit (121, compiled against duktape instead of mozjs)

Happy Hacking!
 
2 members found this post helpful.
Old 12-23-2022, 05:26 AM   #32
kjhambrick
Senior Member
 
Registered: Jul 2005
Location: Round Rock, TX
Distribution: Slackware64 15.0 + Multilib
Posts: 2,159

Rep: Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512
Thanks lucabon

Slackware just gets better-n-better all the time !

-- kjh
 
1 members found this post helpful.
Old 02-20-2023, 06:15 PM   #33
brobr
Member
 
Registered: Oct 2003
Location: uk
Distribution: Slackware
Posts: 974

Rep: Reputation: 239Reputation: 239Reputation: 239
Hi, coming back to the naming...

The `loongarch64` might be the most helpful (accepted?). Today I ran into a Python 'meta-module' "oldest-supported-numpy" as build-requirement for some packages. In the "META" file they use that:

Quote:
LICENSE
Requires-Dist: numpy (==1.22.2) ; platform_machine == "loongarch64" and python_version < "3.11"
...

Last edited by brobr; 02-20-2023 at 06:16 PM.
 
Old 02-21-2023, 12:18 AM   #34
lucabon
Member
 
Registered: Oct 2021
Location: Italy
Distribution: Slackware
Posts: 104

Rep: Reputation: 74
Quote:
Originally Posted by brobr View Post
Hi, coming back to the naming...

The `loongarch64` might be the most helpful (accepted?).
If you export ARCH=loong64, packages based on libtool/configure script (bash, glibc, gcc, etc...) won't build (unsupported architecture) unless you remove the "--build" parameter from "configure". Other build scripts based on cmake or meson/ninja don't care about "$ARCH" environment.

So, you have three options:
1. Remove the "--build=$ARCH-slackware-linux" (the script will autodetect the architecture)
2. Add a specific entry for "loong64" in the statements:
Code:
   case $ARCH in 
     arm*) TARGET=$ARCH-slackware-linux-gnueabi ;;
     loong64) TARGET=loongarch64-slackware-linux ;;
     *)    TARGET=$ARCH-slackware-linux ;;
   esac
3. Leave "$ARCH" environment as "loongarch64", set a new environment (SLACKARCH?) to "loong64" and update the "makepkg $TMP/$PKGNAME-$VERSION-$SLACKARCH-$BUILD.txz" on every build script.

However, my suggestion is to set loongarch64 as ARCH: it leaves mostly untouched Slackware build scripts, and I don't think that 4 characters more will consume so many disk space.... ;-)
 
Old 02-22-2023, 01:15 AM   #35
shipujin
Member
 
Registered: May 2022
Location: China
Distribution: slackwareloong
Posts: 107

Original Poster
Blog Entries: 1

Rep: Reputation: 27
Quote:
Originally Posted by brobr View Post
Hi, coming back to the naming...

The `loongarch64` might be the most helpful (accepted?). Today I ran into a Python 'meta-module' "oldest-supported-numpy" as build-requirement for some packages. In the "META" file they use that:
Hi, ARCH=loong64
My revision process is documented here: https://github.com/slackwarecn/slackware-loongarch64
repo : http://pkg.iloongarch.cn/slackwareloong
bbs: https://bbs.loongarch.org/d/95-loong...rent-bootstrap

Best,
Pujin
 
Old 02-22-2023, 01:30 AM   #36
shipujin
Member
 
Registered: May 2022
Location: China
Distribution: slackwareloong
Posts: 107

Original Poster
Blog Entries: 1

Rep: Reputation: 27
Quote:
Originally Posted by lucabon View Post
If you export ARCH=loong64, packages based on libtool/configure script (bash, glibc, gcc, etc...) won't build (unsupported architecture) unless you remove the "--build" parameter from "configure". Other build scripts based on cmake or meson/ninja don't care about "$ARCH" environment.

So, you have three options:
1. Remove the "--build=$ARCH-slackware-linux" (the script will autodetect the architecture)
2. Add a specific entry for "loong64" in the statements:
Code:
   case $ARCH in 
     arm*) TARGET=$ARCH-slackware-linux-gnueabi ;;
     loong64) TARGET=loongarch64-slackware-linux ;;
     *)    TARGET=$ARCH-slackware-linux ;;
   esac
3. Leave "$ARCH" environment as "loongarch64", set a new environment (SLACKARCH?) to "loong64" and update the "makepkg $TMP/$PKGNAME-$VERSION-$SLACKARCH-$BUILD.txz" on every build script.

However, my suggestion is to set loongarch64 as ARCH: it leaves mostly untouched Slackware build scripts, and I don't think that 4 characters more will consume so many disk space.... ;-)
right, the first time I ported Slackware, I chose ARCH=loongarch64 and built a complete graphical desktop xfce+mate :https://bbs.loongarch.org/d/95-loong...rent-bootstrap

Later, I want to transplant my good Slackware-LoongArch system to provide you with use, I expressed my ARCH idea, and listen to everyone's opinions, finally I choose ARCH=loong64 iso: https://github.com/slackwarecn/slack...eases/tag/v0.3

Best,
Pujin

Last edited by shipujin; 02-22-2023 at 01:46 AM.
 
1 members found this post helpful.
Old 02-22-2023, 06:16 AM   #37
brobr
Member
 
Registered: Oct 2003
Location: uk
Distribution: Slackware
Posts: 974

Rep: Reputation: 239Reputation: 239Reputation: 239
Quote:
Originally Posted by shipujin View Post
right, the first time I ported Slackware, I chose ARCH=loongarch64 ..
and listen to everyone's opinions, finally I choose ARCH=loong64 iso: https://github.com/slackwarecn/slack...eases/tag/v0.3
Hi Pujin,

I bet the work you're doing is very helpful; before you started this thread I never had heard of this new architecture until I cam across "loongarch64" in a fake-python module that relieves some programmers from checking a pile of conditionals but interferes with building from source on Slackware.

My post was not intended to undermine your work, on the contrary. Assuming it is still in early stages, it might be more pragmatic to go along with what the "world out there" is using and see whether settling on a common term is possible. I would guess that this would prevent tons of headaches with respect to adapting/calling scripts in the future.

As it stands, the referred python-package would guess a wrong arch when your box is advertising itself has "loong64" and this would force slackware-users/maintainers to come up with a patch to make it all happen.

Democracy is a great good but sometimes changing course from the one voted for can help to deal with problems that happen to turn up. Even when a 'minority' suggests this other direction. When this change seems reasonable, why not? Have another vote on this if needed. That's how a proper democracy would operate.

keep up the good work,

Rob

Last edited by brobr; 02-22-2023 at 06:20 AM.
 
1 members found this post helpful.
Old 02-22-2023, 08:16 PM   #38
shipujin
Member
 
Registered: May 2022
Location: China
Distribution: slackwareloong
Posts: 107

Original Poster
Blog Entries: 1

Rep: Reputation: 27
Quote:
As it stands, the referred python-package would guess a wrong arch when your box is advertising itself has "loong64" and this would force slackware-users/maintainers to come up with a patch to make it all happen.
Hi, Rob

I didn't quite understand the problem you mentioned,didn't find this problem when I was Slackware-LoongArch bootstrap-build. Could you please send me the repeating steps,thanks

Now Archlinux Debian Gentoo and my Slackware are both using ARCH=loong64, haven't seen this problem. I really hope to continue the discussion with you to make Slackware LoongArch more useful!


Archlinux 64bit ARCH=loong64 https://github.com/loongarchlinux
Debian 64bit ARCH=loong64 https://wiki.debian.org/Ports/loong64
Gentoo 64bit ARCH=loong64 https://wiki.gentoo.org/wiki/Project:LoongArch

Best,
Pujin
 
Old 02-23-2023, 08:23 AM   #39
brobr
Member
 
Registered: Oct 2003
Location: uk
Distribution: Slackware
Posts: 974

Rep: Reputation: 239Reputation: 239Reputation: 239
Hi Pujin, see post #33 and the links. I'm no expert and not using this architecture (no need to compile for it) and if those distributions you mention use the same stick to it ;-). Possibly the developer of that python-module is the one that needs to change definitions or add alternatives. Is loongarch64 used by ubuntu?

Thanks for those links.
 
Old 02-23-2023, 10:10 AM   #40
lucabon
Member
 
Registered: Oct 2021
Location: Italy
Distribution: Slackware
Posts: 104

Rep: Reputation: 74
Quote:
Originally Posted by shipujin View Post
Now Archlinux Debian Gentoo and my Slackware are both using ARCH=loong64
We have to distinguish between the arch assigned to the package name, that could be anything you want (loong, loong64, loongarch, loongarch64, etc.) and the target tuples, that should always start with loongarch64-* (for Slackware, loongarch64-slackware-linux), otherwise most of the packages won't build.

Quote:
Originally Posted by shipujin View Post
haven't seen this problem.
Slackware build scripts are based on the $ARCH environment variables: if this variables is not exported, it will be assumed as `uname -m`. Most of Slackware packages set also by default the name of package as $PKGNAME-$VERSION-$ARCH-$BUILD.txz, so by default you will have "loongarch64" as the "arch" name. If you want to have "loong64", you can follow one the 3 options I already said in post #34, or you can also simply rename the package after building it.

But there are 2 other problems:
1) LIBDIRSUFFIX is set to "64" only for x86_64. For architectures that could have dual word-size (32/64 bit), it will be a good practice to set "64" as LIBDIRSUFFIX for the 64bit variant.
2) Some packages that use libtool/configure/config.guess/config.sub scripts were not updated to support loongarch64 architecture. You should copy the system config.guess/config.sub scripts before running "configure".

For example, the build script for "acl" package should be fixed in this way:
Code:
--- slackware64-current/source/a/acl/acl.SlackBuild	2021-03-12 20:32:16.036986446 +0100
+++ slackware64-current.1/source/a/acl/acl.SlackBuild	2022-10-05 13:17:12.170034721 +0200
@@ -50,7 +50,7 @@
 if [ "$ARCH" = "x86_64" ]; then
   LIBDIRSUFFIX="64"
 else
-  LIBDIRSUFFIX=""
+  LIBDIRSUFFIX=${LIBDIRSUFFIX:-""}
 fi
 
 NUMJOBS=${NUMJOBS:-" -j$(expr $(nproc) + 1) "}
@@ -71,6 +71,9 @@
   \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
   -exec chmod 644 {} \+
 
+# Add AArch64 architecture (and new architectures):
+\cp /usr/share/libtool/build-aux/config.* build-aux/
+
 ./configure \
   --prefix=/usr \
   --libdir=/usr/lib${LIBDIRSUFFIX} \
And you have to export LIBDIRSUFFIX=64

In your repository:
https://github.com/slackwarecn/slackware-loongarch64/
I did not see any change to the this build script, so I suppose you manually modify the script while building, that maybe is not the best practice for an automated (or semi-automated) building process.

The Slackware unofficial porting for loongarch64 I maintain (https://bonslack.org/bonslack_loongarch64-current/) already has the Slackware build scripts "patched" to support loongarch64 and other architectures. The patching process is mostly automated by the "fix_flags_libdir.{pl,sh}" scripts you can find here: https://bonslack.org/source-current/scripts/
To avoid more "patching" to Slackware build scripts, I leave ARCH as loongarch64. But, if you prefer to have "loong64" in the package name, you can simply run "rename -- -loongarch64- -loong64- slackware/*/*".

Hoping this could help to clarify.

Last edited by lucabon; 02-23-2023 at 10:14 AM.
 
2 members found this post helpful.
Old 02-23-2023, 07:06 PM   #41
shipujin
Member
 
Registered: May 2022
Location: China
Distribution: slackwareloong
Posts: 107

Original Poster
Blog Entries: 1

Rep: Reputation: 27
Quote:
Originally Posted by brobr View Post
Hi Pujin, see post #33 and the links. I'm no expert and not using this architecture (no need to compile for it) and if those distributions you mention use the same stick to it ;-). Possibly the developer of that python-module is the one that needs to change definitions or add alternatives. Is loongarch64 used by ubuntu?

Thanks for those links.
Hi, Rob

Now I know your problem, you said *.SlackBuild added ARCH=loong64 support,
Here I am using python-sane as an example to add ARCH=loong64 support

Code:
diff --git a/source/l/python-sane/python-sane.SlackBuild b/source/l/python-sane/python-sane.SlackBuild
index 851c90cb2..6e0174a72 100755
--- a/source/l/python-sane/python-sane.SlackBuild
+++ b/source/l/python-sane/python-sane.SlackBuild
@@ -32,6 +32,7 @@ if [ -z "$ARCH" ]; then
   case "$( uname -m )" in
     i?86) export ARCH=i586 ;;
     arm*) export ARCH=arm ;;
+    loongarch64) export ARCH=loong64 ;;
     # Unless $ARCH is already set, use uname -m for all other archs:
        *) export ARCH=$( uname -m ) ;;
   esac
@@ -57,6 +58,9 @@ elif [ "$ARCH" = "s390" ]; then
 elif [ "$ARCH" = "x86_64" ]; then
   SLKCFLAGS="-O2 -fPIC"
   LIBDIRSUFFIX="64"
+elif [ "$ARCH" = "loong64" ]; then
+  SLKCFLAGS="-O2 -fPIC"
+  LIBDIRSUFFIX="64"
 fi
 
 TMP=${TMP:-/tmp}
github url: https://github.com/slackwarecn/slack...ane.SlackBuild

Best,
Pujin
 
Old 02-23-2023, 07:25 PM   #42
shipujin
Member
 
Registered: May 2022
Location: China
Distribution: slackwareloong
Posts: 107

Original Poster
Blog Entries: 1

Rep: Reputation: 27
Quote:
Originally Posted by lucabon View Post
In your repository:
https://github.com/slackwarecn/slackware-loongarch64/
I did not see any change to the this build script, so I suppose you manually modify the script while building, that maybe is not the best practice for an automated (or semi-automated) building process.
Hi lucabon,

You're looking at the wrong branch, the master branch is origin(current.git), and the ARCH=loong64 branch is LoongArch-20221012

And it wasn't you who reasoned like you did,my Slackware-LoongArch is also built automatically

Recently, I am updating LoongArch-20230213, and xfce, mate and other desktops will come recently

Best,
Pujin
 
Old 03-09-2023, 02:23 AM   #43
shipujin
Member
 
Registered: May 2022
Location: China
Distribution: slackwareloong
Posts: 107

Original Poster
Blog Entries: 1

Rep: Reputation: 27
LoongArch slackware 20230213010936

https://bbs.loongarch.org/d/95-loong...t-bootstrap/60

Last edited by shipujin; 03-15-2023 at 08:22 PM.
 
Old 03-11-2023, 12:42 AM   #44
shipujin
Member
 
Registered: May 2022
Location: China
Distribution: slackwareloong
Posts: 107

Original Poster
Blog Entries: 1

Rep: Reputation: 27
Update libreoffice 7.6.0.0.alpha0+(LOONGARCH64)/LibreOffice

https://bbs.loongarch.org/d/95-loong...t-bootstrap/61
 
Old 03-17-2023, 08:26 PM   #45
shipujin
Member
 
Registered: May 2022
Location: China
Distribution: slackwareloong
Posts: 107

Original Poster
Blog Entries: 1

Rep: Reputation: 27
Update LoongArch chromium: Version 110.0.5481.32 (Developer Build) (64-bit)

https://bbs.loongarch.org/d/95-loong...t-bootstrap/62
 
  


Reply

Tags
port, slackware, slackware -current



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Porting and tuning applications for Linux on Power, Part 2: 15 Porting and tuning tools for Linux on Power LXer Syndicated Linux News 0 05-18-2018 01:05 PM
In linux boot process what is the role of stage1, stage1.5's file and stage 2 maheshp86 Linux - Hardware 7 07-13-2012 08:47 AM
Gentoo Stage1 install problems... GryphonTech Linux - Distributions 7 09-14-2003 04:40 AM
GENTOO 1.4; Stage1 Installation: Installation freezes arthur1968 Linux - Hardware 1 08-28-2003 11:08 AM
Fatal Error in Stage1 I/O error xtec2 Linux - Newbie 10 07-16-2003 04:09 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 03:02 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration