LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 10-28-2017, 11:44 AM   #1
Linux.tar.gz
Senior Member
 
Registered: Dec 2003
Location: Paris
Distribution: Slackware forever.
Posts: 2,534

Rep: Reputation: 100Reputation: 100
Question Alien's libreoffice SlackBuild vpush {d0-d7} asm error


Hi,

Code:
[build CXX] codemaker/source/commonjava/commonjava.cxx
[build JCS] Jar/unoloader
[build C  ] bean/native/unix/com_sun_star_comp_beans_LocalOfficeWindow.c
armhelper.s: Assembler messages:
armhelper.s:54: Error: selected processor does not support `vpush {d0-d7}' in ARM mode
make[1]: *** [/tmp/build/tmp-libreoffice/libreoffice-5.4.2.2/bridges/CustomTarget_gcc3_linux_arm.mk:18: /tmp/build/tmp-libreoffice/libreoffice-5.4.2.2/workdir/CustomTarget/bridges/source/cpp_uno/gcc3_linux_arm/armhelper.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [Makefile:269: build] Error 2
I tried various CFLAGS without success.
 
Old 10-29-2017, 03:03 AM   #2
drmozes
Slackware Contributor
 
Registered: Apr 2008
Distribution: Slackware
Posts: 1,675

Rep: Reputation: 1373Reputation: 1373Reputation: 1373Reputation: 1373Reputation: 1373Reputation: 1373Reputation: 1373Reputation: 1373Reputation: 1373Reputation: 1373
Quote:
Originally Posted by Linux.tar.gz View Post
Hi,

Code:
[build CXX] codemaker/source/commonjava/commonjava.cxx
[build JCS] Jar/unoloader
[build C  ] bean/native/unix/com_sun_star_comp_beans_LocalOfficeWindow.c
armhelper.s: Assembler messages:
armhelper.s:54: Error: selected processor does not support `vpush {d0-d7}' in ARM mode
make[1]: *** [/tmp/build/tmp-libreoffice/libreoffice-5.4.2.2/bridges/CustomTarget_gcc3_linux_arm.mk:18: /tmp/build/tmp-libreoffice/libreoffice-5.4.2.2/workdir/CustomTarget/bridges/source/cpp_uno/gcc3_linux_arm/armhelper.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [Makefile:269: build] Error 2
I tried various CFLAGS without success.

1. What version of Slackware are you building it on?
2. What are the CFLAGS?
 
Old 10-29-2017, 05:06 AM   #3
Linux.tar.gz
Senior Member
 
Registered: Dec 2003
Location: Paris
Distribution: Slackware forever.
Posts: 2,534

Original Poster
Rep: Reputation: 100Reputation: 100
It's on -current.
I ended using only -O2, nothing works.
 
Old 10-29-2017, 02:10 PM   #4
drmozes
Slackware Contributor
 
Registered: Apr 2008
Distribution: Slackware
Posts: 1,675

Rep: Reputation: 1373Reputation: 1373Reputation: 1373Reputation: 1373Reputation: 1373Reputation: 1373Reputation: 1373Reputation: 1373Reputation: 1373Reputation: 1373
Quote:
Originally Posted by Linux.tar.gz View Post
It's on -current.
I ended using only -O2, nothing works.
The build script for libreoffice uses the "gnueabi" quadlet, but it should be "gnueabihf". Change that and see if it works.

If not, it might be that within part of the source, it's hard coding "-march" or "-mcpu" -- I've seen that before and had to rip them out.

After the configuration phase is done, abort and see what's there:
Code:
egrep -r -- '-m(float-abi|arch|cpu)=' .
 
Old 10-29-2017, 03:13 PM   #5
Linux.tar.gz
Senior Member
 
Registered: Dec 2003
Location: Paris
Distribution: Slackware forever.
Posts: 2,534

Original Poster
Rep: Reputation: 100Reputation: 100
Here's the grep :

Quote:
root@arm:/tmp/build/tmp-libreoffice# egrep -r -- '-m(float-abi|arch|cpu)=' .
./libreoffice-5.4.2.2/external/openssl/openssllnx.patch: "bsdi-elf-gcc", "gcc:-DPERL5 -DL_ENDIAN -fomit-frame-pointer -O3 -march=i486 -Wall:unknown)::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
./libreoffice-5.4.2.2/external/openssl/openssllnx.patch:+"debian-kfreebsd-i386","gcc:-DL_ENDIAN -DTERMIOS -O3 -Wa,--noexecstack -g -march=i486 -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
./libreoffice-5.4.2.2/workdir/UnpackedTarball/png/scripts/makefile.msys:#ARCH = -march=pentium3
./libreoffice-5.4.2.2/workdir/UnpackedTarball/png/scripts/makefile.msys:#ARCH = -march=i686
./libreoffice-5.4.2.2/bridges/source/cpp_uno/gcc3_linux_arm/uno2cpp.cxx: * -mfloat-abi=softfp should work. -mfloat-abi=hard won't; that would
./libreoffice-5.4.2.2/configure.ac: ANDROIDCFLAGS="$ANDROIDCFLAGS -march=armv7-a -mfloat-abi=softfp -mfpu=neon"
./libreoffice-5.4.2.2/configure.ac: ANDROIDCFLAGS="-march=atom"
./libreoffice-5.4.2.2/configure: ANDROIDCFLAGS="$ANDROIDCFLAGS -march=armv7-a -mfloat-abi=softfp -mfpu=neon"
./libreoffice-5.4.2.2/configure: ANDROIDCFLAGS="-march=atom"
./libreoffice-5.4.2.2/ChangeLog: since the -march=i486 is not supported on PPC, all further compile
./libreoffice-5.4.2.2/ChangeLog: Configury fixes for MSVC, avoid accidentally using -march=i486
./libreoffice-5.4.2.2/ChangeLog: #i105302# allow build with -mfloat-abi=softfp -mfpu=vfp
./libreoffice-5.4.2.2/config.log:Configured with: ../gcc-7.2.0/configure --with-march=armv7-a --with-float=hard --disable-werror --prefix=/usr --mandir=/usr/man --infodir=/usr/info --libdir=/usr/lib --enable-bootstrap --enable-checking=release --with-system-zlib --disable-libunwind-exceptions --enable-libstdcxx-dual-abi --with-default-libstdcxx-abi=gcc4-compatible --enable-shared --enable-languages=c,c++,ada,fortran,go,lto,objc --enable-objc-gc --enable-threads=posix --enable-__cxa_atexit --enable-libssp --enable-lto --with-gnu-ld --verbose --with-arch-directory= --disable-gtktest --disable-install-libiberty --host=arm-slackware-linux-gnueabihf --build=arm-slackware-linux-gnueabihf --target=arm-slackware-linux-gnueabihf
./libreoffice-5.4.2.2/config.log:Configured with: ../gcc-7.2.0/configure --with-march=armv7-a --with-float=hard --disable-werror --prefix=/usr --mandir=/usr/man --infodir=/usr/info --libdir=/usr/lib --enable-bootstrap --enable-checking=release --with-system-zlib --disable-libunwind-exceptions --enable-libstdcxx-dual-abi --with-default-libstdcxx-abi=gcc4-compatible --enable-shared --enable-languages=c,c++,ada,fortran,go,lto,objc --enable-objc-gc --enable-threads=posix --enable-__cxa_atexit --enable-libssp --enable-lto --with-gnu-ld --verbose --with-arch-directory= --disable-gtktest --disable-install-libiberty --host=arm-slackware-linux-gnueabihf --build=arm-slackware-linux-gnueabihf --target=arm-slackware-linux-gnueabihf
./libreoffice-5.4.2.2/autom4te.cache/output.0: ANDROIDCFLAGS="$ANDROIDCFLAGS -march=armv7-a -mfloat-abi=softfp -mfpu=neon"
./libreoffice-5.4.2.2/autom4te.cache/output.0: ANDROIDCFLAGS="-march=atom"
./libreoffice-5.4.2.2/autom4te.cache/output.1: ANDROIDCFLAGS="$ANDROIDCFLAGS -march=armv7-a -mfloat-abi=softfp -mfpu=neon"
./libreoffice-5.4.2.2/autom4te.cache/output.1: ANDROIDCFLAGS="-march=atom"
 
Old 10-30-2017, 04:25 PM   #6
Linux.tar.gz
Senior Member
 
Registered: Dec 2003
Location: Paris
Distribution: Slackware forever.
Posts: 2,534

Original Poster
Rep: Reputation: 100Reputation: 100
Very strange. I checked Gentoo patches, nothing helpful there.
Slackware is still the only ARM distribution without LibreOffice...
 
Old 10-30-2017, 05:13 PM   #7
abga
Senior Member
 
Registered: Jul 2017
Location: EU
Distribution: Slackware
Posts: 1,634

Rep: Reputation: 930Reputation: 930Reputation: 930Reputation: 930Reputation: 930Reputation: 930Reputation: 930Reputation: 930
@Linux.tar.gz

I haven't tried it myself but I presume that AlienBoB's LibreOffice SlackBuild script will work under Slack ARM 14.2. What you're trying to achieve is to use that script under Slack ARM - current, which is still in development and a different beast when it comes to ARM architecture.
By looking forward to get an ARM-powered basic desktop system in the near future I might share your interest in getting this resolved under Slack ARM current.
The error you stumbled upon looks like an ARM architecture (SF/HF included) mismatch, between what the configure script has guessed, the CFLAGS and compiler target "ARCH-slackware-linux-gnueabi" that are provided in the build script.
From your last post:
Quote:
./libreoffice-5.4.2.2/config.log:Configured with: ../gcc-7.2.0/configure --with-march=armv7-a --with-float=hard
I guess you're using this build script:
http://www.slackware.com/~alien/slac...ice.SlackBuild

Relevant lines from the SlackBuild script:
Code:
  armv7hl)   SLKCFLAGS="-O2 -march=armv7-a -mfpu=vfpv3-d16 -std=c++98"
             SLKLDFLAGS=""; LIBDIRSUFFIX=""
and
Code:
case "$ARCH" in
    arm*) TARGET=$ARCH-slackware-linux-gnueabi ;;
    *)    TARGET=$ARCH-slackware-linux ;;
esac
You haven't specified the ARM architecture you are compiling on and I guess it's an armv7 which is HF and has the NEON SIMD instructions, therefore you should first change the line (not sure if -std=c++98 is really needed):
SLKCFLAGS="-O2 -march=armv7-a -mfpu=vfpv3-d16 -std=c++98"
to
SLKCFLAGS="-O3 -march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -std=c++98"

And then, as @drmozes suggested, change the Target:
arm*) TARGET=$ARCH-slackware-linux-gnueabi ;;
to
arm*) TARGET=$ARCH-slackware-linux-gnueabihf ;;

Give it a try please and see if it works. I'm kinda busy these days and have no time to setup an environment (Raspbery Pi2 + external HDD) and start a compilation on my own, but I'll deffo do it during the weekend.



P.S. This looks to be were your compilation breaks - a patch for ARM HardFloat:
https://bitbucket.org/markjenkins/li...rm/armhelper.S

Last edited by abga; 10-30-2017 at 06:41 PM. Reason: typo & adding the missed -std=c++98 flag & rephrasing - beginning/ending
 
Old 10-31-2017, 02:39 AM   #8
Linux.tar.gz
Senior Member
 
Registered: Dec 2003
Location: Paris
Distribution: Slackware forever.
Posts: 2,534

Original Poster
Rep: Reputation: 100Reputation: 100
I try to build LO every once in a while since 2012, and I also tried on soft float recently, but the error may not have been the same.

Anyway, I did change the flags without success.

I'll take a look at your patch, thanks.
 
Old 10-31-2017, 07:17 AM   #9
drmozes
Slackware Contributor
 
Registered: Apr 2008
Distribution: Slackware
Posts: 1,675

Rep: Reputation: 1373Reputation: 1373Reputation: 1373Reputation: 1373Reputation: 1373Reputation: 1373Reputation: 1373Reputation: 1373Reputation: 1373Reputation: 1373
Quote:
Originally Posted by abga View Post
@Linux.tar.gz

Code:
  armv7hl)   SLKCFLAGS="-O2 -march=armv7-a -mfpu=vfpv3-d16 -std=c++98"
             SLKLDFLAGS=""; LIBDIRSUFFIX=""
This should actually be "arm)" - the architecture name "armv7hl" was for Eric's own ARM port. Doing this will set the CFLAGS correctly.

All Slackware ARM always uses the architecture of "arm" regardless of software or hardware floating point ABI. 3rd party scripts need to check an existing binary and determine how the OS is built:

I've put this code here -- this is how 3rd parties should differentiate between 14.2 (and prior) and -current going forwards.

http://armed.slackware.com/scripts/cflagsarm

Code:
# Automatically determine the architecture we're building on:
MARCH=$( uname -m )
if [ -z "$ARCH" ]; then
  case "$MARCH" in
    i?86)    export ARCH=i586 ;;
    arm*)    export ARCH=arm
             export LIBDIRSUFFIX=""
             export SLK_ARCH_BUILDTARGET="$ARCH-slackware-linux"
             gcc -v 2>&1| egrep -q ".*slack.*gnueabihf" && ARMARCH=hard || ARMARCH=soft
             [ $ARMARCH == soft ] && {
                  export SLKCFLAGS="-O2 -march=armv5te"
                  export SLK_ARCH_BUILDTARGET="${SLK_ARCH_BUILDTARGET}-gnueabi" ;}
             [ $ARMARCH == hard ] && {
                  export SLKCFLAGS="-O2 -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=hard"
                  export SLK_ARCH_BUILDTARGET="${SLK_ARCH_BUILDTARGET}-gnueabihf" ;} ;;
  aarch64)   export ARCH=aarch64
             export LIBDIRSUFFIX="64"
             export SLKCFLAGS="-O2"
             export SLK_ARCH_BUILDTARGET="$MARCH-slackware-linux" ;;
    # Unless $ARCH is already set, use uname -m for all other archs:
    *)       export ARCH=$MARCH ;;
  esac
fi

cat << EOF
ARCH: $ARCH
SLKCFLAGS: $SLKCFLAGS
SLK_ARCH_BUILDTARGET: $SLK_ARCH_BUILDTARGET (used for ./configure --build=$SLK_ARCH_BUILDTARGET)
LIBDIRSUFFIX: $LIBDIRSUFFIX
EOF

Last edited by drmozes; 11-01-2017 at 02:56 AM.
 
Old 10-31-2017, 01:52 PM   #10
Linux.tar.gz
Senior Member
 
Registered: Dec 2003
Location: Paris
Distribution: Slackware forever.
Posts: 2,534

Original Poster
Rep: Reputation: 100Reputation: 100
Too bad you're not sub-checking 32 bit neon-friendly CPUs for -mfpu=neon.
It would ease the recompile and greatly improve the performance on many applications.
 
Old 10-31-2017, 02:52 PM   #11
drmozes
Slackware Contributor
 
Registered: Apr 2008
Distribution: Slackware
Posts: 1,675

Rep: Reputation: 1373Reputation: 1373Reputation: 1373Reputation: 1373Reputation: 1373Reputation: 1373Reputation: 1373Reputation: 1373Reputation: 1373Reputation: 1373
Quote:
Originally Posted by Linux.tar.gz View Post
Too bad you're not sub-checking 32 bit neon-friendly CPUs for -mfpu=neon.
It would ease the recompile and greatly improve the performance on many applications.
I'm not sure what this means, but VFPv3-D16 is the lowest common baseline which is supported by the Tegra20.
 
Old 10-31-2017, 03:24 PM   #12
Linux.tar.gz
Senior Member
 
Registered: Dec 2003
Location: Paris
Distribution: Slackware forever.
Posts: 2,534

Original Poster
Rep: Reputation: 100Reputation: 100
Indeed, not all armv7 have a neon pipeline.
I meant that i usually use sed to enable neon in SLKCFLAGS= , but it would be convenient to get a neon auto-detection for SB and/or at least SBo files.
 
Old 10-31-2017, 06:08 PM   #13
abga
Senior Member
 
Registered: Jul 2017
Location: EU
Distribution: Slackware
Posts: 1,634

Rep: Reputation: 930Reputation: 930Reputation: 930Reputation: 930Reputation: 930Reputation: 930Reputation: 930Reputation: 930
@Linux.tar.gz

- it's not "my patch" I just googled after armhelper.S, learned that it's an Ubuntu/Debian patch and inserted the link for reference
- the vpush instruction that broke your compilation (the compiler/build scripts considered (I guess) that your CPU is not able to use it - e.g. doesn't have VFP) seems to be VFP specific and only shared with NEON:
http://infocenter.arm.com/help/topic.../Bcfchhif.html
http://infocenter.arm.com/help/topic.../CHDIIHGF.html
- my first attempt would be to uncomment (wondering what was the reason to comment it in the first place?) the conditional checking from armhelper.S and try the compilation again:
Code:
#ifdef __ARM_PCS_VFP
	vpush {d0-d7}              @ floating point parameter on stack
#endif
- if it still doesn't work and since you have already the whole LO source tree, either edit the configure script or just run:
Code:
 ./configure --help | more
and look for a directive to disable any use of ASM code. While not optimal, the resulted build will be slower without the optimizations, at least you can narrow down the cause of the issue. There could be some other scripts, not Slackware related, in the LO source that are not properly recognizing your CPU and I still don't know what platform you are trying to compile it on, I just hope you're not cross-compiling.
- I'm wondering what the configure directive --with-system-neon is for, enabling the NEON SIMD code?:
http://www.slackware.com/~alien/slac...ice.SlackBuild
- you're right, while NEON was introduced with Cortex-A7, it seems not all Cortex-A7 come with these NEON SIMD extension enabled/implemented, I forgot that and considered that it's the same as with Cortex-A8, which has it by default. You should check your CPU if it's NEON-able.
https://en.wikipedia.org/wiki/ARM_ar...IMD_.28NEON.29
- furthermore, the source code needs to make explicit use of the NEON instructions, a compiler directive won't really help if there's no such code in the source. And, it looks like the compiler (gcc) needs the third stage of optimization (-O3) to produce usable VFP code:
https://community.arm.com/tools/b/bl...-command-lines

I'll team up with you in the weekend, until then I wish you good luck with your attempts.

Last edited by abga; 10-31-2017 at 06:09 PM.
 
Old 11-01-2017, 04:14 PM   #14
Linux.tar.gz
Senior Member
 
Registered: Dec 2003
Location: Paris
Distribution: Slackware forever.
Posts: 2,534

Original Poster
Rep: Reputation: 100Reputation: 100
Thanks.

I commented the failing asm code, it's actually compiling using only -O2 as flags.
I'll report back.
 
Old 11-01-2017, 06:04 PM   #15
Linux.tar.gz
Senior Member
 
Registered: Dec 2003
Location: Paris
Distribution: Slackware forever.
Posts: 2,534

Original Poster
Rep: Reputation: 100Reputation: 100
Fail :
Code:
Failed to install: No such file or directory at /tmp/build/tmp-libreoffice/libreoffice-5.4.2.2/solenv/bin/ooinstall line 92.
make: *** [Makefile:314: install] Error 2
Installing XML files because 'make distro-pack-install' fails to do so...
install: target '/tmp/build/package-libreoffice/usr/share/appdata/' is not a directory: No such file or directory
libreoffice.SlackBuild FAILED at line 1274
/tmp/install-libreoffice.log :
Code:
ERROR: Failure in installer.pm
ERROR: ERROR: Script setup_osl.ins not found! at /tmp/build/tmp-libreoffice/libreoffice-5.4.2.2/solenv/bin/modules/installer/setupscript.pm line 76.
...
: ERROR: Source for setup_osl.ins not found!
...
Wed Nov  1 23:44:12 2017 (00:00 min.)
Failed to install: No such file or directory at /tmp/build/tmp-libreoffice/libreoffice-5.4.2.2/solenv/bin/ooinstall line 92.
Code:
root@arm:/tmp# find . -name "setup_osl.ins"
root@arm:/tmp#
On a positive note, soffice is there :
Code:
root@arm:/tmp# find . -name "soffice"
./build/tmp-libreoffice/libreoffice-5.4.2.2/workdir/CustomTarget/desktop/soffice
./build/tmp-libreoffice/libreoffice-5.4.2.2/instdir/program/soffice

Last edited by Linux.tar.gz; 11-01-2017 at 06:26 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
[SOLVED] Alien libreoffice SlackBuild Digest::MD5 problem Linux.tar.gz Slackware - ARM 4 10-28-2017 08:50 AM
[Alien's LO 5.2.5] Strange bug/annoyance in Alien's LibreOffice 5.2.5 sombragris Slackware 3 02-05-2017 09:39 AM
Alien Bob's Libreoffice 4.3.0.4 slackbuild AlleyTrotter Slackware 1 08-06-2014 04:53 PM
[SOLVED] LibreOffice-4.2.3 slackbuild error on new KDE integration split off frushiyama Slackware 2 04-22-2014 06:03 PM

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

All times are GMT -5. The time now is 01:46 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