Linux app Manuskript on Pinebook
#1
I'd like to install this application, but my first attempt gave an error concerning not being a correct binary image. What considerations do you need to take in looking for applications that run on Linux?
"Get your facts straight first, then distort them as you wish." -- Mark Twain
  Reply
#2
(08-30-2017, 12:12 AM)Siliconserf Wrote: I'd like to install this application, but my first attempt gave an error concerning not being a correct binary image. What considerations do you need to take in looking for applications that run on Linux?


Binary executable codes "compiled linked object files" (blobs) must be compiled for the processor that they are going to be running on primarily ( what we call the target processor ) and secondarily must be coded for the target operating system architecture.

In the case of the Pinebook that means that the target processor is an A64 SoC designed and manufactured by Allwinner.  It is a 64bit SoC containing four A53 Arm cores capable of running both 32bit and 64bit code;  if the operating system was compiled for the aarch64  target ( 64bit ) then both 32bit and 64bit codes will run provided that they were compiled for the target processor A64 (and provided the 32bit libraries are present).   If on the other hand the operating system was compiled for the armhf target ( 32bit ) then only 32 bit codes will run on the processor provided that the codes were compiled for the armhf target as well !

If you try to run codes for an Intel x86 style processor on the A64 SoC, they will not run;  the x86 codes will only run on an x86 processor or in an x86 emulator.  If you try to run 64bit codes on a 32bit system ( even if they were compiled for the target SoC) they will not run either.

Having said all of that;  this is one of the many reasons why free software ( and open source ) are important !  If you have the sources for the app you want to install you can build the app for the target processor ( A53 core A64 SoC ), and the target Arm version ( in our case, either aarch64 or armhf ) and they will run great regardless the machine architecture the codes were developed on !
Shy

Note:   Some software will not run on a given linux distribution ( distro ) because the scripts and configuration files required by the app do not match the configuration of the distro;  Usually these can be made to work given some time to port the changes assuming that the source is available or that the configuration files are all human readable text files.
marcushh777    Cool

please join us for a chat @  irc.pine64.xyz:6667   or ssl  irc.pine64.xyz:6697

( I regret that I am not able to respond to personal messages;  let's meet on irc! )
  Reply
#3
(08-30-2017, 12:27 AM)MarkHaysHarris777 Wrote:
(08-30-2017, 12:12 AM)Siliconserf Wrote: I'd like to install this application, but my first attempt gave an error concerning not being a correct binary image. What considerations do you need to take in looking for applications that run on Linux?


Binary executable codes "compiled linked object files" (blobs) must be compiled for the processor that they are going to be running on primarily ( what we call the target processor ) and secondarily must be coded for the target operating system architecture.

In the case of the Pinebook that means that the target processor is an A64 SoC designed and manufactured by Allwinner.  It is a 64bit SoC containing four A53 Arm cores capable of running both 32bit and 64bit code;  if the operating system was compiled for the aarch64  target ( 64bit ) then both 32bit and 64bit codes will run provided that they were compiled for the target processor A64 (and provided the 32bit libraries are present).   If on the other hand the operating system was compiled for the armhf target ( 32bit ) then only 32 bit codes will run on the processor provided that the codes were compiled for the armhf target as well !

If you try to run codes for an Intel x86 style processor on the A64 SoC, they will not run;  the x86 codes will only run on an x86 processor or in an x86 emulator.  If you try to run 64bit codes on a 32bit system ( even if they were compiled for the target SoC) they will not run either.

Having said all of that;  this is one of the many reasons why free software ( and open source ) are important !  If you have the sources for the app you want to install you can build the app for the target processor ( A53 core A64 SoC ), and the target Arm version ( in our case, either aarch64 or armhf ) and they will run great regardless the machine architecture the codes were developed on !
Shy

Note:   Some software will not run on a given linux distribution ( distro ) because the scripts and configuration files required by the app do not match the configuration of the distro;  Usually these can be made to work given some time to port the changes assuming that the source is available or that the configuration files are all human readable text files.
OK, I'm working with Theologeek to see about getting involved in porting to the A64. My problem is I'm good on C, C++, and asm, but for embedded systems and Windows. Not much experience at all with Linux (part of the reason for becoming interested in the Pinebook.) I'll need someone to work with to understand the low level glue stuff like support files and configuration issues. Also, I have no idea at the moment where to get the open source cross compiler and project management software to run under Windows 10.
"Get your facts straight first, then distort them as you wish." -- Mark Twain
  Reply
#4
taking a quick look at the download page they do offer an archlinux package. i think there are some archlinux builds for some models but not sure which ones.
  Reply
#5
(08-30-2017, 10:43 AM)Siliconserf Wrote: OK, I'm working with Theologeek to see about getting involved in porting to the A64. My problem is I'm good on C, C++, and asm, but for embedded systems and Windows. Not much experience at all with Linux (part of the reason for becoming interested in the Pinebook.) I'll need someone to work with to understand the low level glue stuff like support files and configuration issues. Also, I have no idea at the moment where to get the open source cross compiler and project management software to run under Windows 10.


I'm going to answer your questions in reverse or, sentence by sentence;  in general, and I do mean this in the generous spirit of right good will--  you're going to want to dump windows;  windows will only get in the way, constrain you, and force you to use paradigms which are out-moded and which are not helpful.  Hint.
You will want to use a unix-like OS;  freeBSD, OpenBSD, Mac OS, or any of a number of flavors of gnu+linux.  So, first let's mention gnu + linux.  Linux is just the kernel;  NOT the system.  The system is primarily two things in a modern environment: 1) GNU,  and 2) Systemd.   You are going to want to learn those two components, and they are a steep learning curve.  Find a good "Learn Linux in Five Days" course on-line;  it will jump-start you;  I can recommend two or three if you're interested.



Ok, answers to your questions,  in reverse:

(1) You  have three choices for open source compilation development software,  in no particular order,  LLVM based clang,  Apple's (C|C++  -like) "Swift,"  and  GNU's  gcc.  These are freely available for virtually all platforms these days ( but not all ).  I use  LLVM,  clang,  and  gnu  C|C++ ( gcc ).  These will run right there on your Pinebook !

(2) In the old days newbies needed to learn the unix filesystem, permissions, and sysvinit.  Today the filesystem and permissions are still paramount but in a modern environment you will also need to learn Systemd-- I can only overstate this pedantically about 100 times, don't ignore it.  I'm willing to work with you and help you come up to speed, but caveats are 1) I won't do your work for you, and 2) I won't help you struggle with proprietary systems development models like Windows.

3)  Like anything,  you will gain gnu+linux experience by gaining experience ( pedantics ) Rome wasn't built in a day, and there is no royal road to geometry.

4)  If you're good at C, C++, and Assembler--  that's 3/4 the battle;  gnu+linux just makes using those tools cleaner, and easier. If by "embedded systems" you are referring to the sketches on the Arduino Uno,  yes,  programming on a unix-like environment is significantly more difficult.  You have something more than  setup() and loop().

5) Porting codes to Arm gets tricky because many of the underlying dependencies of the original build environment are not available for Arm;  if you can build them yourself, great,  but if not you'll need to find an alternative or scrap the project until your skills improve ( or get a project partner who can fill in the gaps ).



Again, sorry to be pedantic ( its really not my intent ).  I'm just trying to be complete;  you asked a mouth-full !

Rolleyes
marcushh777    Cool

please join us for a chat @  irc.pine64.xyz:6667   or ssl  irc.pine64.xyz:6697

( I regret that I am not able to respond to personal messages;  let's meet on irc! )
  Reply
#6
(08-30-2017, 09:46 PM)MarkHaysHarris777 Wrote:
(08-30-2017, 10:43 AM)Siliconserf Wrote: OK, I'm working with Theologeek to see about getting involved in porting to the A64. My problem is I'm good on C, C++, and asm, but for embedded systems and Windows. Not much experience at all with Linux (part of the reason for becoming interested in the Pinebook.) I'll need someone to work with to understand the low level glue stuff like support files and configuration issues. Also, I have no idea at the moment where to get the open source cross compiler and project management software to run under Windows 10.


I'm going to answer your questions in reverse or, sentence by sentence;  in general, and I do mean this in the generous spirit of right good will--  you're going to want to dump windows;  windows will only get in the way, constrain you, and force you to use paradigms which are out-moded and which are not helpful.  Hint.
You will want to use a unix-like OS;  freeBSD, OpenBSD, Mac OS, or any of a number of flavors of gnu+linux.  So, first let's mention gnu + linux.  Linux is just the kernel;  NOT the system.  The system is primarily two things in a modern environment: 1) GNU,  and 2) Systemd.   You are going to want to learn those two components, and they are a steep learning curve.  Find a good "Learn Linux in Five Days" course on-line;  it will jump-start you;  I can recommend two or three if you're interested.



Ok, answers to your questions,  in reverse:

(1) You  have three choices for open source compilation development software,  in no particular order,  LLVM based clang,  Apple's (C|C++  -like) "Swift,"  and  GNU's  gcc.  These are freely available for virtually all platforms these days ( but not all ).  I use  LLVM,  clang,  and  gnu  C|C++ ( gcc ).  These will run right there on your Pinebook !

(2) In the old days newbies needed to learn the unix filesystem, permissions, and sysvinit.  Today the filesystem and permissions are still paramount but in a modern environment you will also need to learn Systemd-- I can only overstate this pedantically about 100 times, don't ignore it.  I'm willing to work with you and help you come up to speed, but caveats are 1) I won't do your work for you, and 2) I won't help you struggle with proprietary systems development models like Windows.

3)  Like anything,  you will gain gnu+linux experience by gaining experience ( pedantics ) Rome wasn't built in a day, and there is no royal road to geometry.

4)  If you're good at C, C++, and Assembler--  that's 3/4 the battle;  gnu+linux just makes using those tools cleaner, and easier. If by "embedded systems" you are referring to the sketches on the Arduino Uno,  yes,  programming on a unix-like environment is significantly more difficult.  You have something more than  setup() and loop().

5) Porting codes to Arm gets tricky because many of the underlying dependencies of the original build environment are not available for Arm;  if you can build them yourself, great,  but if not you'll need to find an alternative or scrap the project until your skills improve ( or get a project partner who can fill in the gaps ).



Again, sorry to be pedantic ( its really not my intent ).  I'm just trying to be complete;  you asked a mouth-full !

Rolleyes

Pendantic -- Not a problem. You are being quite helpful.

As far as Windows, Mac, or whatever, I don't really care. Success is the objective. (I already have the target application on Win-10. This is to get the program to run on the Pinebook, and learn to be at home on the underlying operating system.)

Since posting I've found GCC and the rest of the tools on Pinebook. My use of Unix based system dates pretty far back and as such my skills are very rusty, but all the tools present on that machine it makes sense to compile on the PB. It may not be as fast as my laptop, but I expect local machine idiosyncrasies to be somewhat supported in the compiler suite.

At any rate, the problems I expect are from a) lack of Xenix experience, b) the local hardware dependencies (hardware tree?), and the need for custom machine code, if any, embedded in source with macro conditionals to select the right CPU target. A nudge here and there as to what direction to take with a problem will be appreciated. I'm not looking for anyone to offload tasks onto - how else am I going to really understand the tools if I don't get my hands dirty with them?

Much thanks
"Get your facts straight first, then distort them as you wish." -- Mark Twain
  Reply
#7
Success! The nudge to use ArchLinux was what set me on the right path to puzzle out what needed to be done.

I used git on the Pinebook to download the source file. Then I unpacked that and ran the update/upgrade/install sudo commands recommended by the download page, which made sure all the dependencies, mostly Python stuff, were there and up to date. Then I told Make to do its thing. It kept telling me there was no UI target. so I told it to rebuild everything anyway. That did not take long so I'm not sure a lot was actually compiled. Manuskript seems to have a lot of Python module source files.

The last piece of the puzzle in porting was figuring out that it was important how you launch the program. By experiment I found you must go through the file manager window, not a terminal window, and you must select the Terminal output option. That opens a terminal window that doesn't find the Spanish translator module, then a desktop program window and you're in business. Any other option or approach to launch seems to result in the program opening a terminal window and aborting, the launch file opened in a text editor, or nothing at all seems to happen.

Although I can live with the current method of launching Manuskript, is there enough information here to figure out what Mate wants done to the desktop icon to make the application launch properly?
"Get your facts straight first, then distort them as you wish." -- Mark Twain
  Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  Are Pinebook images compatible with Pine64+? starcrescent 7 108 09-18-2019, 09:22 AM
Last Post: tophneal
  Pinebook 1080p / KDE Neon freezes every 5-10 min pyrrhumain 10 329 09-18-2019, 08:15 AM
Last Post: rookieone
Information Manjaro ARM for Pinebook erchache2000 65 4,479 09-05-2019, 03:07 AM
Last Post: fitter
  Archlinux (mainline) for Pinebook anarsoul 51 13,827 08-28-2019, 05:23 PM
Last Post: conlaoch
  will openMP work on a pinebook? rustythorn 2 94 07-23-2019, 01:42 PM
Last Post: tophneal
  Armbian - Xenial Desktop (Pinebook) pineadmin 83 17,545 07-17-2019, 01:22 PM
Last Post: catsmile
  pinebook 1080p crash and fix nano2 2 176 06-24-2019, 07:41 PM
Last Post: pyrrhumain
  NIxOS installation guide for Pinebook Surehand53 0 155 06-23-2019, 03:46 AM
Last Post: Surehand53
  Improve the life of your Pinebook battery by setting charger's voltage limits wlad 0 168 06-11-2019, 02:27 PM
Last Post: wlad
  How can I reliably get battery status on pinebook tillea 5 1,293 06-11-2019, 10:10 AM
Last Post: wlad

Forum Jump:


Users browsing this thread: 1 Guest(s)