Discussion:
[hercules-390] Compile on Raspberry PI 3
sglavach@comcast.net [hercules-390]
2017-03-26 18:40:05 UTC
Permalink
Hoping someone can help and point me in the right direction


- Trying to compile Hercules-4.0 (Hyperion) on a Raspberry PI 3
- Using Raspian Jessie Lite (minus the X-windows Gui, etc..) as the base OS (which I believe is a flavor of Debian)
- I Git Clone the source
- I apt-get install the necessary packages plus a few optional ones (bldlvlck passes all it's checks)
- I use 1Stop to execute compile process which gets and compiles SoftFloat successfully and compiles Hercules to completion with a number of the following messages:


*** Warning: This system can not link to static lib archive ../libhercs.la.
*** I have the capability to make that library automatically link in when
*** you link to this library. But I can only do this if you have a
*** shared version of the library, which you do not appear to have.
*** But as you try to build a module library, libtool will still create
*** a static module, that should work as long as the dlopening application
*** is linked with the -dlopen flag to resolve symbols at runtime.



Hercules will execute and start successfully but it has a number of devtypes not recognized, the most critical being 3270... it mounts the DASD successfully.



From searching and reading a number of other threads I know some people had a similar issue with libtools (linking?) performing correctly when 'uname -p" returned no value... on my system it returns "unknown" if that helps anyone.


Any help is appreciated.


Thanks,


Steve...
sglavach@comcast.net [hercules-390]
2017-03-26 18:48:15 UTC
Permalink
Additional info... I compiled with the following parms:

configure --enable-cckd-bzip2 --enable-het-bzip2 --enable-regina-rexx --enable-optimization="-mcpu=cortex-a53 -mfpu=neon-fp-armv8 -mfloat-abi=hard"



and I have also tried using:


-mcpu=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard



Same results either way.


Steve...
Ivan Warren ivan@vmfacility.fr [hercules-390]
2017-03-26 18:56:25 UTC
Permalink
Post by ***@comcast.net [hercules-390]
configure --enable-cckd-bzip2 --enable-het-bzip2 --enable-regina-rexx
--enable-optimization="-mcpu=cortex-a53 -mfpu=neon-fp-armv8
-mfloat-abi=hard"
-mcpu=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard
Same results either way.
Steve...
Steve,

Try...

Once soft3h has been compiled. (You can ^C 1Stop at this point)
Create a build directory directory
Copy sf3h directory from parent of source directory to parent of build
directory (may not be necessary if the source and build directory share
the same parent)
Run <source dir>/configure <whatever flags you like> --prefix=<run
directory>
make
make install
export PATH=$PATH:<run directory>/bin
* go to where your hercules.cnf lives.
hercules

--Ivan



[Non-text portions of this message have been removed]
'John P. Hartmann' jphartmann@gmail.com [hercules-390]
2017-03-26 19:43:37 UTC
Permalink
You can specify the configure flags on 1Stop.
Post by Ivan Warren ***@vmfacility.fr [hercules-390]
Post by ***@comcast.net [hercules-390]
configure --enable-cckd-bzip2 --enable-het-bzip2 --enable-regina-rexx
--enable-optimization="-mcpu=cortex-a53 -mfpu=neon-fp-armv8
-mfloat-abi=hard"
-mcpu=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard
Same results either way.
Steve...
Steve,
Try...
Once soft3h has been compiled. (You can ^C 1Stop at this point)
Create a build directory directory
Copy sf3h directory from parent of source directory to parent of build
directory (may not be necessary if the source and build directory share
the same parent)
Run <source dir>/configure <whatever flags you like> --prefix=<run
directory>
make
make install
export PATH=$PATH:<run directory>/bin
* go to where your hercules.cnf lives.
hercules
--Ivan
[Non-text portions of this message have been removed]
------------------------------------

------------------------------------

Community email addresses:
Post message: hercules-***@yahoogroups.com
Subscribe: hercules-390-***@yahoogroups.com
Unsubscribe: hercules-390-***@yahoogroups.com
List owner: hercules-390-***@yahoogroups.com

Files and archives at:
http://groups.yahoo.com/group/hercules-390

Get the latest version of Hercules from:
http://www.hercules-390.org


------------------------------------

Yahoo Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/hercules-390/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/hercules-390/join
(Yahoo! ID required)

<*> To change settings via email:
hercules-390-***@yahoogroups.com
hercules-390-***@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
hercules-390-***@yahoogroups.com

<*> Your use of Yahoo Groups is subject to:
https://info.yahoo.com/legal/us/yahoo/utos/terms/
sglavach@comcast.net [hercules-390]
2017-03-26 20:05:09 UTC
Permalink
Ivan,

The current directory structure is:


- armv7l
---> hyperion
---> s3fh


thus I believe this is already set the way you requested.


Now by run directory are you saying the directory that Hercules runs out of? I currently show Hercules to be compiled and placed in /usr/local/bin... thus you would like me to try:


1. Configure with my parms and include --prefix=usr/local/bin ???
2. Make and Make Install
3. Export path and include the usr/local/bin directory
4. Go back into my source (which is the only place is see Hercules.cnf) and execute Hercules from there.


Thanks for your help and suggestions!


Steve...
'John P. Hartmann' jphartmann@gmail.com [hercules-390]
2017-03-26 19:46:47 UTC
Permalink
Autotools is confused. the .la file is not necessarily a static
library. It is a shell script that builds a library.

Can you check which device managers have been built in the .libs
directory of the build directory.
Post by ***@comcast.net [hercules-390]
Hoping someone can help and point me in the right direction
- Trying to compile Hercules-4.0 (Hyperion) on a Raspberry PI 3
- Using Raspian Jessie Lite (minus the X-windows Gui, etc..) as the base
OS (which I believe is a flavor of Debian)
- I Git Clone the source
- I apt-get install the necessary packages plus a few optional ones
(bldlvlck passes all it's checks)
- I use 1Stop to execute compile process which gets and compiles
SoftFloat successfully and compiles Hercules to completion with a number
*** Warning: This system can not link to static lib archive ../libhercs.la.
*** I have the capability to make that library automatically link in when
*** you link to this library. But I can only do this if you have a
*** shared version of the library, which you do not appear to have.
*** But as you try to build a module library, libtool will still create
*** a static module, that should work as long as the dlopening application
*** is linked with the -dlopen flag to resolve symbols at runtime.
Hercules will execute and start successfully but it has a number of
devtypes not recognized, the most critical being 3270... it mounts the
DASD successfully.
From searching and reading a number of other threads I know some people
had a similar issue with libtools (linking?) performing correctly when
'uname -p" returned no value... on my system it returns "unknown" if
that helps anyone.
Any help is appreciated.
Thanks,
Steve...
sglavach@comcast.net [hercules-390]
2017-03-26 20:18:09 UTC
Permalink
John,

The .libs directory in the build directory contains a number of device files:


hdt3270.a
hdt3270.la
hdt3270.lai


it has these 3 file extensions for most of the device types I see: 1052c,1403,2703,2880,3088,3270,3420,3505,3525,3705. No .so files.


Steve...
'John P. Hartmann' jphartmann@gmail.com [hercules-390]
2017-03-26 20:35:32 UTC
Permalink
So autotools is clearly confused. You do need a .so file for device
managers; the various other libraries can be .a

I suppose uname -p is the culprit. I doubt that configuring
--enable-shared
will be much help, but it is worth at try. You might also try
--disable-static
Post by ***@comcast.net [hercules-390]
John,
hdt3270.a
hdt3270.la
hdt3270.lai
1052c,1403,2703,2880,3088,3270,3420,3505,3525,3705. No .so files.
Steve...
------------------------------------------------------------------------
------------------------------------------------------------------------
sglavach@comcast.net [hercules-390]
2017-03-26 20:52:17 UTC
Permalink
I'll give those options a try...

I notice in the configure log the following messages:


checking build system type... armv7l-unknown-linux-gnu
checking host system type... armv7l-unknown-linux-gnu
checking target system type... armv7l-unknown-linux-gnu


I'll assume the armv7l comes from the uname -m command
and
I'll assume the unknown comes from uname -p command


both verified by manually entering the uname commands.


Steve...
wrljet@gmail.com [hercules-390]
2017-03-26 22:40:48 UTC
Permalink
What I did on Pi Zero, was more or less:

Run 1Stop until it stops with an error

cd ../armv6*

../hyperion/configure --prefix=/home/bill/tools/hercules --enable-s3fh-altdir=./s3fh

Then manually edited Makefile, decNumber/Makefile, crypto/Makefile
and removed the CPU options to gcc.

And run make.
stephen.orso@yahoo.com [hercules-390]
2017-03-27 14:12:32 UTC
Permalink
Hi Steve:

If you are still having difficulty, or are still using the procedure described by Bill earlier in this thread and reproduced below, would you please do the following:


1) re-clone Hyperion from https://github.com/hercules-390/hyperion https://github.com/hercules-390/hyperion
2) re-run 1Stop


When 1Stop completes, success or failure, run the following command from the build directory. Note that 1Stop leaves you in the source directory at completion.


3) make diagnostic


Then please post the output from make diagnostic to this thread.


Many thanks!


Best Regards,
Steve Orso


---In hercules-***@yahoogroups.com, <***@...> wrote :

What I did on Pi Zero, was more or less:

Run 1Stop until it stops with an error

cd ../armv6*

../hyperion/configure --prefix=/home/bill/tools/hercules --enable-s3fh-altdir=./s3fh

Then manually edited Makefile, decNumber/Makefile, crypto/Makefile
and removed the CPU options to gcc.

And run make.
sglavach@comcast.net [hercules-390]
2017-03-27 18:12:57 UTC
Permalink
Steve,

Here are the diagnostic results: I appreciate the help!


System information
/etc/os-release PRETTY_NAME="Raspbian GNU/Linux 8 (jessie)" NAME="Raspbian GNU/Linux" VERSION_ID="8" VERSION="8 (jessie)" ID=raspbian ID_LIKE=debian HOME_URL="http://www.raspbian.org/" SUPPORT_URL="http://www.raspbian.org/RaspbianForums" BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"
uname -a Linux raspberrypi 4.9.17-v7+ #981 SMP Fri Mar 24 14:21:53 GMT 2017 armv7l GNU/Linux
uname -m armv7l
uname -p unknown
uname -s Linux

Build tools versions
autoconf autoconf (GNU Autoconf) 2.69
automake automake (GNU automake) 1.14.1
m4 m4 (GNU M4) 1.4.17
make GNU Make 4.0
compiler gcc (Raspbian 4.9.2-10) 4.9.2
linker GNU ld (GNU Binutils for Raspbian) 2.25

Build directories
source /home/pi/hyperion
build /home/pi/armv7l/hyperion
Install directories
prefix /usr/local
exec_prefix /usr/local
bindir /usr/local/bin
libdir /usr/local/lib
includedir /usr/local/include
datarootdir /usr/local/share
datadir /usr/local/share
mandir /usr/local/share/man
infodir /usr/local/share/info
docdir /usr/local/share/doc/hercv4

Values from automake
BUILD_HERCIFC Defined
BUILD_FTHREADS Undefined
BUILD_SHARED Defined
OPTION_DYNAMIC_LOAD Defined

Values from make
$CC gcc
$CFLAGS -g -O2 -W -Wall -O2 -mcpu=cortex-a53 -mfpu=neon-fp-armv8 -mfloat-abi=hard
$CXX g++
$CXXFLAG -g -O2
$LDFLAGS -Wl,--warn-common
$CPPFLAGS -DPKGDATADIR=\"/usr/local/share/hercv4\" -DMODULESDIR=\"/usr/local/lib/hercv4\" -DHERC_LOCALEDIR=\"/usr/local/share/locale\"

Values from configure
$LIBS -lrt -lz -lresolv -lnsl -lm -ldl -pthread -lbz2 -L/home/pi/armv7l/s3fh/lib -lSoftFloat
$S3FH_INC /home/pi/armv7l/s3fh/include
$S3FH_LIB @S3FH_LIB@ (future use)
$HQA_INC .

Values generated by Makefile.am
$AM_CPPFLAGS -I/home/pi/hyperion -I/home/pi/hyperion/decNumber -I/home/pi/armv7l/s3fh/include -I.
$DYNAMIC_VERISON /home/pi/armv7l/hyperion
$DYNMOD_LD_ADD libherc.la libhercs.la libhercu.la -lrt -lz -lresolv -lnsl -lm -ldl -pthread -lbz2 -L/home/pi/armv7l/s3fh/lib -lSoftFloat
$DYNMOD_LD_FLAGS -module -no-undefined -export-dynamic -avoid-version
$FTHREADS
$HDEPS
$HDLFLAGS
$HERCIFC hercifc
$HERCLIBS
$HERCLIBS2 libhercs.la libhercu.la libherct.la libhercd.la libherc.la
$HERCLIN herclin
$LDADD -lrt -lz -lresolv -lnsl -lm -ldl -pthread -lbz2 -L/home/pi/armv7l/s3fh/lib -lSoftFloat
$LIB_LD_FLAGS -export-dynamic -no-undefined -avoid-version
$LTDL ltdl.c
$tools_ADDLIBS libhercs.la libhercu.la libherct.la libhercd.la libherc.la -lrt -lz -lresolv -lnsl -lm -ldl -pthread -lbz2 -L/home/pi/armv7l/s3fh/lib -lSoftFloat
$tools_LD_FLAGS
$XSTATIC
stephen.orso@yahoo.com [hercules-390]
2017-03-29 22:24:47 UTC
Permalink
Hi Steve:


I have been able to reproduce your issue using the QEMU emulator on Window-10. While diagnosis continues, your issue does not appear to be related to the ARM cpu optimization options (-m command line options) included in the Makefile.


In particular, the -mfpu=neon-fp-armv8 -mfloat-abi=hard options relate to exploitation of hardware floating point support.


In Hercules, one infrequently-used mainframe non-floating point instruction uses floating point in its emulation, and all emulation of mainframe floating point instructions is done in software, not in the host system's hardware. See float.c, ieee.c, and dfp.c for details if you wish. The remaining option, -mcpu, enables gcc to optimize for a specific ARM processor and is not required to generate code for ARM.


Note also that the Raspberry PI is not a "supported" platform for Hercules v4 (Hyperion); there is no certainty that this can be made to work.


Although it has really been great fun getting an ARM emulator running on my Windows 10 machine. I just wish it were as fast as Debian/Ubuntu/FreeBSD/Leap/CentOS on Virtualbox.


Best Regards,
Steve Orso


---In hercules-***@yahoogroups.com, <***@...> wrote :

Steve,

Here are the diagnostic results: I appreciate the help!


[...]
Values from make
$CC gcc
$CFLAGS -g -O2 -W -Wall -O2 -mcpu=cortex-a53 -mfpu=neon-fp-armv8 -mfloat-abi=hard
$CXX g++
$CXXFLAG -g -O2
$LDFLAGS -Wl,--warn-common
$CPPFLAGS -DPKGDATADIR=\"/usr/local/share/hercv4\" -DMODULESDIR=\"/usr/local/lib/hercv4\" -DHERC_LOCALEDIR=\"/usr/local/share/locale\"
[...]
Steven Glavach sglavach@comcast.net [hercules-390]
2017-03-29 23:43:35 UTC
Permalink
Either way, thanks for the help!

I know I have seen others stating that have successfully compiled on the rp3, I just haven't pieced the puzzle together yet!

Thanks,

Steve...
Post by ***@yahoo.com [hercules-390]
I have been able to reproduce your issue using the QEMU emulator on Window-10. While diagnosis continues, your issue does not appear to be related to the ARM cpu optimization options (-m command line options) included in the Makefile.
In particular, the -mfpu=neon-fp-armv8 -mfloat-abi=hard options relate to exploitation of hardware floating point support.
In Hercules, one infrequently-used mainframe non-floating point instruction uses floating point in its emulation, and all emulation of mainframe floating point instructions is done in software, not in the host system's hardware. See float.c, ieee.c, and dfp.c for details if you wish. The remaining option, -mcpu, enables gcc to optimize for a specific ARM processor and is not required to generate code for ARM.
Note also that the Raspberry PI is not a "supported" platform for Hercules v4 (Hyperion); there is no certainty that this can be made to work.
Although it has really been great fun getting an ARM emulator running on my Windows 10 machine. I just wish it were as fast as Debian/Ubuntu/FreeBSD/Leap/CentOS on Virtualbox.
Best Regards,
Steve Orso
Steve,
Here are the diagnostic results: I appreciate the help!
[...]
Values from make
$CC gcc
$CFLAGS -g -O2 -W -Wall -O2 -mcpu=cortex-a53 -mfpu=neon-fp-armv8 -mfloat-abi=hard
$CXX g++
$CXXFLAG -g -O2
$LDFLAGS -Wl,--warn-common
$CPPFLAGS -DPKGDATADIR=\"/usr/local/share/hercv4\" -DMODULESDIR=\"/usr/local/lib/hercv4\" -DHERC_LOCALEDIR=\"/usr/local/share/locale\"
[...]
'John P. Hartmann' jphartmann@gmail.com [hercules-390]
2017-03-30 06:52:37 UTC
Permalink
I was under the impression that raspberry pi does neither floating point
nor block concurrent access. I that correct?
dave.g4ugm@gmail.com [hercules-390]
2017-03-30 08:28:16 UTC
Permalink
I think you havn't kept up with the latest changes..

The issue with floating point was that the original PI was ARM V6 and Debian only supported the hardware float in ArmV7 but the PI V2 onwards are Arm v7 and have hardware float.
Raspian was Debian with downgraded h/w float so even the v2 has hard float, but I think there were some issues building Hercules with it enabled..

I don't know about concurrent access, I assume you mean concurrent memory access? There must be some atomic operations because the PIv3 has a quad core CPU

Dave
-----Original Message-----
Sent: 30 March 2017 07:53
Subject: Re: [hercules-390] Re: Compile on Raspberry PI 3
I was under the impression that raspberry pi does neither floating point nor
block concurrent access. I that correct?
------------------------------------
------------------------------------
http://groups.yahoo.com/group/hercules-390
http://www.hercules-390.org
------------------------------------
Yahoo Groups Links
Harold Grovesteen h.grovsteen@tx.rr.com [hercules-390]
2017-03-30 13:25:24 UTC
Permalink
Post by ***@gmail.com [hercules-390]
I think you havn't kept up with the latest changes..
The issue with floating point was that the original PI was ARM V6 and Debian only supported the hardware float in ArmV7 but the PI V2 onwards are Arm v7 and have hardware float.
Raspian was Debian with downgraded h/w float so even the v2 has hard float, but I think there were some issues building Hercules with it enabled..
I don't know about concurrent access, I assume you mean concurrent memory access? There must be some atomic operations because the PIv3 has a quad core CPU
Dave
Yes, ARM has atomic operations. I mucked about with the codezero ARM
hypervisor some time ago when it was open source and saw the use of such
instructions.

Harold Grovesteeen
wrljet@gmail.com [hercules-390]
2017-03-30 13:50:09 UTC
Permalink
I never tried building it on QEMU. That would take forever. :-)

(BTW, it takes 5 days to build gcc 6.2 from source on a Pi Zero)

On the Pi Zero, which is a somewhat lesser CPU than the Pi 3, but runs the same
binaries, I have Hyperion working fine.

The auto-detected -mcpu stuff in your experiment is different from mine, because
the Pi 3 has a different ARM. But the fix is the same.
Remove all those switches and let the native compiler on the Pi decide what to use.

On mine, with gcc (Raspbian 4.9.2-10) 4.9.2, I change the CFLAGS from:

CFLAGS = -g -O2 -W -Wall -O2 -g -g3 -ggdb3 -mcpu=armv6l -mtune=armv6l -frename-registers

to:

CFLAGS = -g -O2 -W -Wall -O2 -g -g3 -ggdb3 -frename-registers

-Bill
sglavach@comcast.net [hercules-390]
2017-03-31 18:32:46 UTC
Permalink
I'm pulling my hair out here <g>

Have tried everything suggested and still looks like issues with linking in certain libraries (libhercX.XX)


On a lark I tried compiling 3.12 from source and had no problems...everything compiles, links and works as expected on the RP3. Then I tried compiling 4.0 using the gcc parameters that were devised for 3.12 just to humor myself and still no luck.


Steve...
stephen.orso@yahoo.com [hercules-390]
2017-04-01 14:29:44 UTC
Permalink
Hi Steve:

I am sorry to say that I am unable to clear a path for you to build Hercules without error messages. While I experimented a bit with what might be done with the build to get it to run cleanly on a Raspberry PI 3, or at least Raspbian on a QEMU ARM emulation, I failed.


I suspect part of the difficulty I had is that I do not have a PI 3, and QEMU emulates the ARM 6, not the 7. Well, ARM 7 emulations exist, but it appears from others' experience that the networking does not work on Raspbian.


That said, the error messages you received do not mean you have a completely non-functional Hercules. Rather, static libraries have been built rather than shared or dynamically loaded. Only emulation of the modern cryptography instructions need to be in a shared/dynamic library. Other parts should be functional.


Make check will fail about half of its tests; the failing tests relate to crypto. The rest pass.


You should be able to run IBM's older operating systems (DOS/360, DOS/VS, OS/MFT, OS/MVT, MVS 3.8j).


Bill's suggestions still have merit, unless you tried them with no success. Because Bill has a PI 3, he may be able to help.


Please accept my apologies for being unable to provide a solution.


Best Regards,
Steve Orso




---In hercules-***@yahoogroups.com, <***@...> wrote :

I'm pulling my hair out here <g>

Have tried everything suggested and still looks like issues with linking in certain libraries (libhercX.XX)


On a lark I tried compiling 3.12 from source and had no problems...everything compiles, links and works as expected on the RP3. Then I tried compiling 4.0 using the gcc parameters that were devised for 3.12 just to humor myself and still no luck.


Steve...
wrljet@gmail.com [hercules-390]
2017-04-02 13:27:51 UTC
Permalink
Steve,

Mine is a Pi Zero (lesser umph than the Pi 3).

I'm planning to pull the latest source and redo the whole thing from scratch again,
but it'll be a few days. I'm in deep weeds on something else right now.

Bill

Continue reading on narkive:
Loading...