-
Notifications
You must be signed in to change notification settings - Fork 28
/
HOWTO-INSTALL-OPEN64
181 lines (131 loc) · 6.57 KB
/
HOWTO-INSTALL-OPEN64
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
Installing Open64
=================
Introduction
------------
This document explains how to compile and install Open64 on an IA32/X86_64/IA64
based system. The documentation is split into 6 steps:
* Prerequisites
* Obtaining the Source Code
* Compiling
* Environment Variables
* Installation
* Building and installing the FORTRAN libraries
We encourage you to pay attention to the Prerequisites in order to avoid un-
necessary problems later in the build process. Should you ever encounter any
problems with one of the steps, please take a look in the FAQ, the forum or
leave a comment on our web site http://www.open64.net.
If you want to compile and install Open64 X86-PPC cross compiler, there is a few
differences you should notice, see doc/HOWTO-INSTALL-OPEN64-PPC-CROSS
Prerequisites
-------------
In order to compile Open64 successfully, you should meet the following
requirements:
* Linux based OS
Currently, Open64 is intensively tested on Linux on IA64/X86_64/IA32. The
recommended OS is Ubuntu 16.04 LTS.
* IA32/x86_64/IA64 based machine
In this release, Open64 is supported and tested for the Itanium 2 and
IA32/x86_64 architectures. Itanium 1 and generic IA32 is also supported,
but not tested carefully.
* GNU Make
You should use a up to date version of Make. The system default versions
on most recently Linux distributions have been tested and work with our
Makefile.
* GCC (GNU Compiler Collection)
In order to compile the Open64 source code, you need GCC 5.x - 7.x. The
recommended GCC version is GCC 5.4.0 available on Ubuntu 16.04 LTS.
Obtaining the Source Code
-------------------------
To compile Open64 you need to obtain the source code first.
There are two ways:
* Obtain the Source Code as Archive
You can download the source code from github.com. You can download
different versions from github.com. The master zip file is available
at:
https://github.com/open64-compiler/open64/archive/master.zip
Extract the source code:
unzip master.zip
* Obtain the Source Code from our Subversion Repository
You can also obtain the latest version of our source code from the sub-
version repository.
To get the latest version issue the following command:
git clone https://github.com/open64-compiler/open64.git open64
This will copy the latest code to the directory open64.
You can also surf through the git repository online on github.com.
Compiling
---------
The open64 build process has been changed to use the autoconf tool that
many other opensource products use. In the old build process, it was
necessary to set variables on the make command to control the build;
MACHINE_TYPE, BUILD_OPTIMIZE, and TOOLROOT arguments were passed to the
make command to control what type of open64 compiler to build.
To build open64 with CLANG front end, please check and follow the instructions
available in osprey/clang2whirl/README.md.
In the new build process, these arguments are passed to the configure
script (using a different syntax) and then the 'make all' and 'make
install' commands are run without any arguments.
Here is a mapping for some of the old make options to configure options:
Makefile setting configure option
MACHINE_TYPE=i386 --target=i386-unknown-linux-gnu(1)
MACHINE_TYPE=ia64 --target=ia64-unknown-linux-gnu
BUILD_OPTIMIZE=DEBUG --with-build-optimize=DEBUG
BUILD_COMPILER=GNU --with-build-compiler=GNU
TOOLROOT=/opt/open64 --prefix=/opt/open64
(1) If you are building on an 386/x86_64 system, the target will
default to building a 32 bit compiler with 32 and 64 bit libraries
and you do not have to use this option.
Other differences between the old and new build are that 'make' or 'make
all' now builds both the compiler and the libraries. It is no longer
neccessary to run 'make all' to build the compiler and then 'make lib'
to build the libraries.
Additionally, the libraries that need to be compiled with the open64
compiler will be built using the compiler that was just created during
the make process. A seperate open64 compiler is not needed to build
these libraries.
To build open64 create a directory (obj) somewhere not underneath the
open64 directory containing the source files. Switch to that directory
and execute the commands:
<path-to-open64-dir>/open64/configure
make all
If you want to build a debuggable compiler you can add the
"--with-build-optimize=debug" argument to the configure command.
If you know where you want to install the compiler you build, add
"--prefix=<path>" to the configure command and after running make
to build the compiler you can run "make install" to install the
compiler in the path specified by the --prefix argument. The default
prefix is /usr/local.
1. Building the compiler on x86_64
By default, on x86_64 machines, the compiler will be built in 32 bit
mode and libraries will be built in 32 and 64 bit modes to support
compilation in either mode. You can build 64 bit executables by
specifying "--build=x86_64-unknown-linux-gnu" on the configure command.
2. some tips on Ubuntu machines
If you are building the compiler on Ubuntu machine, you need to install the
following tools first:
awk, csh, bash, gmake, flex and bison,
On some Ubuntu distributions, you need to change the symbol link '/bin/sh'
to '/bin/bash' to make the scripts work.
If you met the following error:
##./table INTERNAL ERROR: Unexpected line: Abort
##sh: line 1: 27052 Segmentation fault ./table <OPTIONS.P
you need to make sure the awk is linked to mawk on your ubuntu machine
3. libraries
Libraries used to be built seperately from the compiler, but now the
libraries as well as the compiler are built as part of the default
make target. The libraries are built using the newly built compiler
Environment Variables
---------------------
Open64 used to use the environment variable TOOLROOT to specify the
installation location and to help the compiler find libraries and
binaries. TOOLROOT should no longer be used and the installation
location should be specified via the --prefix argument to configure.
Warning!!!
If you have TOOLROOT set it could still affect where open64 looks for
libraries and executables.
Installation
------------
Once you have done "make all" to make the compiler, "make install" will
copy it to the location specified by the --prefix argument to configure.
If --prefix was not used the default install location is in /usr/local.
Congratulations. You have succsessfully installed Open64. Have fun.
Your Open64 Team