Discussion:
[hercules-390] CMake build for Hercules V4 (Hyperion)
stephen.orso@yahoo.com [hercules-390]
2017-08-18 11:28:08 UTC
Permalink
A CMake-based build for Hercules has been added to Hercules-390 V4 (Hyperion).


The new process targets open source and UNIX-like systems and has been tested on Centos 7, Debian (8 & 9, 32- and 64-bit), FreeBSD 11, FreeBSD 12, Leap 42.2, Solaris 11.3, Ubuntu 16, and the Windows Subsystem for Linux (Ubuntu 14.04 level).


Windows builds using CMake are not yet supported, but will be. CMake build support for Windows is the next development goal.


The CMake build eliminates the need for any relationship between the Hyperion build directory and the Source directory, and will build SoftFloat-3a for you if needed. There is no need to run autogen.sh when using the CMake build.


A QUICK START leads off the CMake build pages noted below. A "What To Do When it Fails" section at the end of the first page lists information that will be most helpful in problem reports.


For those who have come to appreciate the value of 1Stop, a 1Stop-CMake script has been added. But please review the QUICK START before deciding 1Stop-CMake is your best bet; you may decide the "normal" CMake build is as easy as 1Stop is. 1Stop-CMake works in the same way as 1Stop, but uses CMake for the Hyperion build.


The current GNU autotools-based build still exists.


You can find more information about using CMake to build Hyperion at:


http://hercules-390.github.io/html/CMake http://hercules-390.github.io/html/CMake


Clone the Hyperion project using git and the following URL:



https://github.com/hercules-390/hyperion https://github.com/hercules-390/hyperion
stephen.orso@yahoo.com [hercules-390]
2017-09-13 14:34:17 UTC
Permalink
The CMake build for Hercules V4 (Hyperion) has been updated to ensure that the status of the git clone used as source for CMake is checked on each build and updated as needed.

This means if there are changes in source status (new, changed, or deleted files), commitinfo.h will be recreated, version.c will be recompiled, and shared library hercu will be re-linked. Other shared libraries, including those that depend on hercu, will only be rebuilt based on your development activity; the updated commitinfo.h will not trigger other compile or link actions.


You will need to pull or re-clone your source directory and rerun CMake to make this update effective.
broweo@yahoo.com [hercules-390]
2018-05-04 20:09:01 UTC
Permalink
I'm trying to follow this on a current raspbian and running into an error as follows: "cc: error: missing argument to ‘-march=’" I tried setting CMAKE_C_FLAGS to include it but no change.


Suggestions?


***@raspberrypi:~/hercules/hyperion/CMake$ export CMAKE_C_FLAGS='-march=native'
***@raspberrypi:~/hercules/hyperion/CMake$ export CMAKE_CPP_FLAGS='-march=native'
***@raspberrypi:~/hercules/hyperion/CMake$ cd ../../build
***@raspberrypi:~/hercules/build$ cmake --build .
[ 3%] Built target html
[ 6%] Built target Zlib
[ 9%] Built target BZip2
[ 10%] Building C object CMakeFiles/hercs.dir/hsys.c.o
cc: error: missing argument to ‘-march=’
CMakeFiles/hercs.dir/build.make:62: recipe for target 'CMakeFiles/hercs.dir/hsys.c.o' failed
make[2]: *** [CMakeFiles/hercs.dir/hsys.c.o] Error 1
CMakeFiles/Makefile2:2001: recipe for target 'CMakeFiles/hercs.dir/all' failed
make[1]: *** [CMakeFiles/hercs.dir/all] Error 2
Makefile:160: recipe for target 'all' failed
make: *** [all] Error 2
broweo@yahoo.com [hercules-390]
2018-05-04 20:34:22 UTC
Permalink
I went back to the first cmake step and added -DCMAKE_C_FLAGS="-march=native" to the command line but i note at the end of that the display still shows a bare -march= at the end of the release build options

------------------------------------------------------------------------
Install prefix /usr/local
Executable directory bin
Library directory lib
Modules directory lib
Data Directory (http) /usr/local/share/Hercules
Source directory /home/pi/hercules/hyperion
Build directory /home/pi/hercules/build
Generator: Unix Makefiles
Build command line: /usr/bin/make
C compiler version: GNU 6.3.0
C options (Release): -march=native -DHAVE_CONFIG_H -g3 -ggdb3 -DNDEBUG -O2 -march=
C options (Debug): -march=native -DHAVE_CONFIG_H -g3 -ggdb3 -g
Install RPATH: $ORIGIN/../lib
Large file support: Using native large file support.
Hercules link libs: m;dl
Target processor: armv6l
------------------------------------------------------------------------
stephen.orso@outlook.com [hercules-390]
2018-05-04 22:26:38 UTC
Permalink
Hi Broweo (?),

1) Thanks for trying the CMake build on Raspberry Pi and reporting your issue.


2) It sounds like I have an issue in the automatic optimization for ARM processors. Give me a day or so to figure it out.


In the meantime, you may be able to build successfully by replacing


-DCMAKE_C_FLAGS="-march=native"


with the following:


-DOPTIMIZATION="-march=native -DHAVE_CONFIG_H -g3 -ggdb3 -DNDEBUG -O2"


This suppresses automatic optimization.


Best Regards,
Steve Orso



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

I went back to the first cmake step and added -DCMAKE_C_FLAGS="-march=native" to the command line but i note at the end of that the display still shows a bare -march= at the end of the release build options

------------------------------------------------------------------------
Install prefix /usr/local
Executable directory bin
Library directory lib
Modules directory lib
Data Directory (http) /usr/local/share/Hercules
Source directory /home/pi/hercules/hyperion
Build directory /home/pi/hercules/build
Generator: Unix Makefiles
Build command line: /usr/bin/make
C compiler version: GNU 6.3.0
C options (Release): -march=native -DHAVE_CONFIG_H -g3 -ggdb3 -DNDEBUG -O2 -march=
C options (Debug): -march=native -DHAVE_CONFIG_H -g3 -ggdb3 -g
Install RPATH: $ORIGIN/../lib
Large file support: Using native large file support.
Hercules link libs: m;dl
Target processor: armv6l
------------------------------------------------------------------------
broweo@yahoo.com [hercules-390]
2018-05-04 22:50:58 UTC
Permalink
Thanks. I'll try that tomorrow morning(EDT)

Bill Rowe
stephen.orso@outlook.com [hercules-390]
2018-05-04 23:34:26 UTC
Permalink
Hi Bill,

I'm EDT as well, eastern Pennsylvania.


Looking into this further, I think doing the following will take care of the issue:


In file CMake/Herc31_COptsGNU.cmake, please delete the following lines 284-286:


if( NOT "${optimization_flags}" STREQUAL "" )
set( CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -march=${I386_target}" )
endif( )



So if you have the patience and time, please give this a try. In the meantime, I'll get my QEMU Raspberry system back in shape and develop the final correction.


Thanks again for trying CMake and reporting the issue you encountered.


Best Regards,

Steve Orso


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

Thanks. I'll try that tomorrow morning(EDT)

Bill Rowe
broweo@yahoo.com [hercules-390]
2018-05-05 12:24:31 UTC
Permalink
ok. Your bypass fix worked. I'll make a new build directory and try the second suggestion there.



------------------------------------------------------------------------
Install prefix /usr/local
Executable directory bin
Library directory lib
Modules directory lib
Data Directory (http) /usr/local/share/Hercules
Source directory /home/pi/hercules/hyperion
Build directory /home/pi/hercules/build
Generator: Unix Makefiles
Build command line: /usr/bin/make
C compiler version: GNU 6.3.0
C options (Release): -DHAVE_CONFIG_H -g3 -ggdb3 -O3 -DNDEBUG -march=native - DHAVE_CONFIG_H -g3 -ggdb3 -DNDEBUG -O2
C options (Debug): -DHAVE_CONFIG_H -g3 -ggdb3 -g
Install RPATH: $ORIGIN/../lib
Large file support: Using specifically-enabled large file support.
Hercules link libs: m;dl
Target processor: armv6l
------------------------------------------------------------------------




-- Configuring done
-- Generating done
-- Build files have been written to: /home/pi/hercules/build
broweo@yahoo.com [hercules-390]
2018-05-05 21:05:07 UTC
Permalink
Ok. The --build seemed to complete 100% with no errors.

Now I just need to get TK4 to use it!

Martin Taylor mtayloribm360@yahoo.com [hercules-390]
2018-05-04 23:41:06 UTC
Permalink
Hello Team,
I have tried the new build process which is a lot easier than the old to say the least. I do have a question concerning the level of OSX/MACOS supported. I have a Mac Pro running OSX 10.7 (Lion) and have installed all the required software (CMake, Xcode,git).
The cmake step fails with missing function clock_gettime. According to a web search this is not a supported function on 10.7.

So do anyone know what the minimum OSX level required for Hyperion is ?

Regards,
Martin.
Loading...