LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware > Slackware - ARM
User Name
Password
Slackware - ARM This forum is for the discussion of Slackware ARM.

Notices


Reply
  Search this Thread
Old 12-06-2020, 01:45 PM   #1
slac-in-the-box
Member
 
Registered: Mar 2010
Location: oregon
Distribution: slackware64-15.0 / slarm64-current
Posts: 780
Blog Entries: 1

Rep: Reputation: 432Reputation: 432Reputation: 432Reputation: 432Reputation: 432
SlackBuilds that work on arm/64


Howdy armed slackers

Although the first post of the SlackBuilds not building on -current thread never specifically mentions architecture, I assume that thread is for x86 and x86_64 architectures, and that ponce has enough to do without posts about SlackBuilds not building on slarm64-current on his thread.

In this slackware-arm forum, I see many threads troubleshooting the compilation of various third party software packages most of which already have SlackBuilds at slackbuilds.org that succeed without modification, and others that fail, but would succeed with modification, and a few that won't build at all because arm or arm64 is not supported yet.

Maybe there is already a thread for this, and if so, just point me to it; but it seems like the slackware-arm and the slarm64 community could benefit from a similar thread focused on assembling a list of SlackBuilds which had to be modified to work on arm or arm64.

Even if the modifications weren't made by the official maintainers, it would give maintainers a resource to check to see if anyone had already done some work at getting their package to build for arm/64, and they could merge such modifications into their official SlackBuilds, or redo them their own way.

The end game goal of having all third party packages that I use build with execution of one script, has been achieved for x64 thanks to sbopkg.

But the same script fails on the pinebook pro -- too many Slackbuilds not updated for arm64 yet. I want to update all my SlackBuilt packages in one shebang! The sooner the official maintainers have arm64 compliant SlackBuilds the better.

So, I'll be hacking away one package after another until this pinebook pro performs the way my 10-year old wants (runescape, minetest, and so on). Every time I successfully modify an official SlackBuild script, I'm going to post that modification to this thread with hopes of being helpful.

Cheers
 
Old 12-06-2020, 02:00 PM   #2
glorsplitz
Senior Member
 
Registered: Dec 2002
Distribution: slackware!
Posts: 1,308

Rep: Reputation: 368Reputation: 368Reputation: 368Reputation: 368
all sounds good, keep us posted

BTW, how you like the performance of your pinebook pro? Is it full slackwarearm install?

With the pandemic, I thought I saw something mentioned somewhere their quality control was lacking a little.
 
Old 12-07-2020, 09:35 AM   #3
slac-in-the-box
Member
 
Registered: Mar 2010
Location: oregon
Distribution: slackware64-15.0 / slarm64-current
Posts: 780

Original Poster
Blog Entries: 1

Rep: Reputation: 432Reputation: 432Reputation: 432Reputation: 432Reputation: 432
So far, the PBP has impressed me in every way, except for its lack of ethernet port and for suspend-to-ram remaining a mystery.

At first I thought it had a bad power supply, but after I pushed a little more firmly, it clicked all the way into place--I hadn't been fully inserting the adapter for its first week, and thought it came with a shorted cord. Rather than blame myself, I harbored ill thoughts about manufacturers of cheap power adapters for a week.

Some folks wants to blame rather than learn--some hear about free open hardware and flock to it, not prepared for the learning curve, so instead of admitting this to themselves, they blame the hardware, which was probably fine and just needed the correct firmware blob in the correct place.

I suspect that type of psychology is inflating the poor quality control reputation, coming from consumers who purchased developer devices.

The Pinebook Pro has six little penguins inside, and compiles a gnu linux kernel and all the modules and device tree blobs in 2-3 hours.

Waiting for the pinebook pro is the hardest part. I ordered in December 2019, and it arrived mid-March, 2020: be prepared for some lag when pine64 store fulfills orders.

Last edited by slac-in-the-box; 12-18-2020 at 11:49 AM.
 
1 members found this post helpful.
Old 12-07-2020, 07:09 PM   #4
shelldweller
Member
 
Registered: Mar 2019
Distribution: Slackware
Posts: 300

Rep: Reputation: Disabled
Cool, I have been waiting for a thread like this to form. I use scripts from ponce's SBo-current fork all the time on my Pinebook A64. The vast majority of them compile without modification. Some of them need a newer config.sub and config.guess swapped into the build directory so that aarch64 is recognized as a legitimate architecture, although these tend to be older scripts that haven't been updated in a few years. Only a scant few simply will not build for various reasons.

Right now, I can count the scripts I am currently using that I have had to modify on two hands. If we get into specific packages, I can mention specific fixes.

Also, I use a few command-line options when building from SBo directly, some of which are A64 specific, so you might need something different depending on your particular processor:

Code:
TAG=${TAG:-_shldwlr} SLKCFLAGS="-O2 -march=armv8-a -mtune=cortex-a53 -fPIC -DPIC" LIBDIRSUFFIX="64"
The packages for which I have had to modify the build script significantly are hosted here, along with some others I uploaded just for fun:

https://shelldweller.beauxbead.com/s...larm/packages/

In each of those, the modified SlackBuild file can be found in the /usr/doc folder of the archive, just for reference.

Anyway, I have been building various packages on the Pinebook for about two years now, and I have a pretty good idea of how to get around the variety of issues that crop up. If/when you run into a specific error, post it here and I am sure we can figure it out as a group.

neat-o
 
3 members found this post helpful.
Old 12-09-2020, 04:20 AM   #5
aaditya
Member
 
Registered: Oct 2013
Location: India
Distribution: Slackware
Posts: 272
Blog Entries: 2

Rep: Reputation: 85
Personal experience

I use this regex in general to add support for aarch64 in Slackbuilds.

Some libraries like lua need -fPIC in SLKCFLAGS to compile.

Some autoconf based packages like openbox need autoreconf -fi before running configure to setup build files for native arch.
 
1 members found this post helpful.
Old 12-18-2020, 11:38 AM   #6
slac-in-the-box
Member
 
Registered: Mar 2010
Location: oregon
Distribution: slackware64-15.0 / slarm64-current
Posts: 780

Original Poster
Blog Entries: 1

Rep: Reputation: 432Reputation: 432Reputation: 432Reputation: 432Reputation: 432
Lost in The Dungeon of Javva the Hutt

Yep: the slackbuild that is weak in the source, and strong in the fine print. I clicked agree, so I could download stuff from Oracle, but must confess that I didn't read the fine print to find out what it was taking away.

JDK/JRE is dependency for some of the third party slackbuilds I use, so I'm trying to get a functional java environment on slarm64, whether jdk, openjdk, icedtea, or whatever, so long as it works. When I mentioned earlier that thanks to sbopkg, I had gotten installation of all the third party packages down to a single script: I should have said all of them except java; because of its separate agreement, I had been manually downloading its source and executing its SlackBuild, which was way easier on x64, but is failing on arm64.

I followed "Java in Slackware," using the officially released binary downloaded from oracle: jdk-15.0.1_linux-aarch64_bin.tar.gz. The slackbuild produced a slackware package, and after installation, there's symbolic link, /usr/bin/java which points to /usr/lib/java/bin/java, and another symbolic link, /usr/lib/jdk-15.0.1 which points to /usr/lib/java. The command "which java" returns /usr/bin/java. The command "echo $JAVA_HOME" returns /usr/lib/java. I've restarted. I've also sourced /etc/profile.d/jdk.sh.

The command "java -version" returns: "bash: /usr/bin/java: No such file or directory."

So I tried downloading the entire directory http://www.slackware.com/~alien/slac.../openjdk/build, but when I execute the slackbuild, the last error is: "A Java header genearator was not found" and that it couldn't find a makefile.

I've also looked at building openjdk on the pbp, and it suggests "at a minimum, a machine with 8 cores is advisable, as well as 8 GB of RAM. (The more cores to use, the more memory you need.) At least 6 GB of free disk space is required. If you do not have access to sufficiently powerful hardware, it is also possible to use cross-compiling." It also mentioned that it is advisable to have SSD drive in device performing the build.

Before I continue, I was hoping someone just had a slackware package of jdk for slarm64

Otherwise, I'm gonna try to use a usb-c-to-ethernet adaptor (YEAH, pbp, a developer device without an ethernet port, grr), and distcc to offload some of the processing to the 4 cores on a nearby lenovo ideapad. Ram will be short, but maybe with a 4GB swap file, it will work. I also am waiting for the ssd adaptor to arrive, then I can have native ssd, and try this openjdk build.

Javva the Hutt. Just want to wrap a chain around its neck...
 
Old 12-18-2020, 11:48 AM   #7
sndwvs
Senior Member
 
Registered: Aug 2014
Posts: 1,907

Rep: Reputation: Disabled
easy way: after installing jdk-15.0.1_linux-aarch64_bin.tar.gz. do
Code:
cd /lib  && ln -s ../lib64/ld-linux-aarch64.so.1 .
 
3 members found this post helpful.
Old 12-18-2020, 12:48 PM   #8
slac-in-the-box
Member
 
Registered: Mar 2010
Location: oregon
Distribution: slackware64-15.0 / slarm64-current
Posts: 780

Original Poster
Blog Entries: 1

Rep: Reputation: 432Reputation: 432Reputation: 432Reputation: 432Reputation: 432
Quote:
Originally Posted by sndwvs View Post
easy way: after installing jdk-15.0.1_linux-aarch64_bin.tar.gz. do
Code:
cd /lib  && ln -s ../lib64/ld-linux-aarch64.so.1 .
So java needs ld, the gnu linker, and was looking in /lib, when it was in /lib64, so a simple symbolic link is solution.

Holy smokes! That was easy. Out of the dungeon and back on the falcon: yeeha & thanks.

whew.
 
1 members found this post helpful.
Old 12-18-2020, 12:52 PM   #9
sndwvs
Senior Member
 
Registered: Aug 2014
Posts: 1,907

Rep: Reputation: Disabled
second option, unpack jdk-15.0.1_linux-aarch64_bin.tar.gz go to the folder and execute
Code:
 find . | xargs file | grep -e "executable\(.*\)interpreter" \
            | grep ELF | cut -f1 -d ':' \
            | xargs -I '{}' patchelf --set-interpreter /lib64/ld-linux-aarch64.so.1 '{}'
 
2 members found this post helpful.
Old 12-20-2020, 11:30 AM   #10
shelldweller
Member
 
Registered: Mar 2019
Distribution: Slackware
Posts: 300

Rep: Reputation: Disabled
Ah, yeah, I have run into issues with /usr/lib vs. /usr/lib64 in various ways numerous times. I just implemented a lazy-man's fix, not sure if it is a bad idea for some reason, but I have not run into any issues, and it seems to have fixed many others...

I just moved everything from /usr/lib to /usr/lib64 and then made a symbolic link from /usr/lib to /usr/lib64. Like I said, maybe that is a bad idea for some reason I am unaware of (please enlighten me), but I have had zero issues since doing that.

YMMV
 
1 members found this post helpful.
Old 12-20-2020, 11:37 AM   #11
sndwvs
Senior Member
 
Registered: Aug 2014
Posts: 1,907

Rep: Reputation: Disabled
there is no problem as such and aarch64 is /lib, since I follow the Slackware architecture I also use /lib64. all third party software is linked to /lib. and there are 2 ways to make a symlink or fix it in the compiled software patchelf --set-interprete.
 
3 members found this post helpful.
Old 05-05-2022, 02:20 PM   #12
slac-in-the-box
Member
 
Registered: Mar 2010
Location: oregon
Distribution: slackware64-15.0 / slarm64-current
Posts: 780

Original Poster
Blog Entries: 1

Rep: Reputation: 432Reputation: 432Reputation: 432Reputation: 432Reputation: 432
Quote:
Originally Posted by aaditya View Post
I use this regex in general to add support for aarch64 in Slackbuilds...
I've been doing the same thing as that regex, only with some cflags for pinebook pros:

Sometimes the slackbuilds on aarch64 are populating /usr/lib instead of /usr/lib64, so that other builds don't find the pkconfigs because pkg_config_path is set for /usr/lib64, but the pkconfigs came out in /usr/lib.

So for these, I've been editing many a slackbuild script, by adding an additional "else-if" statement for aarch64 to the if statement matching architecture to cflags and libdir suffix:

Code:
elif [ "$ARCH" = "aarch64" ]; then
     SLKCFLAGS="-march=armv8-a+crc+crypto -mtune=cortex-a72.cortex-a53 -02 -pipe"
     LIBDIRSUFFIX="64"
Today, building ardour6 for pinebook pro, I've had to edit the slackbuild for

cppunit
serd
sord
libwebsockets
cwiid
rubberband
vamp-plugin-sdk
liblo
aubio

I haven't reached the end yet. sqg -p and sbopkg -i, couldn't quite pull it off because of having to make this same update to the buildscripts.

Out of curioisty, are there any aarch64-updated forks of the SBo-git repository?

Am I to understand that this asbt can download and mirror entire sbo repository, and the scripts will have the aarch64 correct because of line419? I guess I'll have to try this out. Thanks for sharing @aaditya

Last edited by slac-in-the-box; 05-05-2022 at 02:22 PM.
 
  


Reply

Tags
slackbuilds, slackware-arm, slarm64



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
How to use Slackbuilds in Slackware arm ? takakia Slackware - ARM 4 01-21-2016 09:30 PM
SlackBuilds for FPC and Lazarus on Slackware 14.1 ARM slacksam Slackware - ARM 0 05-12-2014 01:44 AM
Have you ever used "Emlink for ARM" Emulator to debug your ARM Cortex-M3 processors? kennyfly899 Linux - Newbie 0 06-27-2009 01:45 AM
Compile the linux2.6.14.1 for arm must ues the arm-linux-gcc-3.4.4? frankyue Linux - Embedded & Single-board computer 2 12-20-2008 07:28 AM
Use SlackBuilds.org or my own hosting to offer up SlackBuilds? hollywoodb Slackware 6 11-30-2006 08:56 PM

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

All times are GMT -5. The time now is 05:10 PM.

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