• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1From File: curl_gnv_build_steps.txt
2
3 Copyright 2009, John Malmberg
4
5 Permission to use, copy, modify, and/or distribute this software for any
6 purpose with or without fee is hereby granted, provided that the above
7 copyright notice and this permission notice appear in all copies.
8
9 THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
15 OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16
17Currently building Curl using GNV takes longer than building Curl via DCL.
18The GNV procedure actually uses the same configure and makefiles that
19Unix builds use.
20
21Building CURL on OpenVMS using GNV requires GNV V2.1-2 or the updated
22images that are available via anonymous FTP at encompasserve.org in the gnv
23directory.  It also requires the GNV Bash 4.2.45 kit as an update from the
24same location or from the sourceforge.net GNV project.
25
26The HP C 7.x compiler was used for building the GNV version.
27
28The source kits are provided in backup savesets inside of the PCSI install kit.
29
30Backup save sets are currently the only distribution medium that I can be
31sure is installed on a target VMS system that will correctly unpack files
32with extended character sets in them.  You may need to adjust the ownership
33of the restored files, since /Interchange/noconvert was not available at the
34time that this document was written.
35
36[gnv.common_src]curl_*_original_src.bck is the original source of the curl kit
37as provided by the curl project.  [gnv.vms_src]curl-*_vms_src.bck, if present,
38has the OpenVMS specific files that are used for building that are not yet in
39the curl source kits for that release distributed https://curl.haxx.se
40
41These backup savesets should be restored to different directory trees on
42an ODS-5 volume(s) which are referenced by concealed rooted logical names.
43
44SRC_ROOT: is for the source files common to all platforms.
45VMS_ROOT: is for the source files that are specific to OpenVMS.
46          Note, you should create the VMS_ROOT: directory tree even if it is
47          initially empty.  This is where you should put edits if you are
48          making changes.
49LCL_ROOT: is manually created to have the same base and sub-directories as
50          SRC_ROOT: and VMS_ROOT:
51
52The logical name REF_ROOT: may be defined to be a search list for
53VMS_ROOT:,SRC_ROOT:
54
55The logical name PRJ_ROOT: is defined to be a search list for
56LCL_ROOT:,VMS_ROOT:,SRC_ROOT:
57
58For the make install process to work, it must have write access to the
59directories referenced by the GNU: logical name.
60
61In future releases of GNV, and with GNV Bash 4.3.30 installed, this name
62should be GNV$GNU:
63
64As directly updating those directories would probably be disruptive to other
65users of the system and require elevated privilege, this can be handled by
66creating a separate directory tree to install into which can be referenced
67by the concealed rooted logical name new_gnu:.  A concealed logical name of
68OLD_GNU: can be set up to reference the real GNV directory tree.
69
70Then a local copy of the GNU/GNV$GNU logical names can be set up as a search
71list such as NEW_GNU:,OLD_GNU:
72
73The directory NEW_GNU:[usr] should be created.  The make install phase should
74create all the other directories.
75
76The make install process may abort if curl is already because it can not
77uninstall the older version of curl because it does not have permission.
78
79The file stage_curl_install.com is used set up a new_gnu: directory tree
80for testing.  The PCSI kitting procedure uses these files as input.
81
82These files do not create the directories in the VMS_ROOT and LCL_ROOT
83directory trees.  You can create them with commands similar to:
84
85  $ create/dir lcl_root:[curl]/prot=w:re
86  $ copy src_root:[curl...]*.dir -
87    lcl_root:[curl...]/prot=(o:rwed,w:re)
88  $ create/dir vms_root:[curl]/prot=w:re
89  $ copy src_root:[curl...]*.dir -
90    vms_root:[curl...]/prot=(o:rwed,w:re)
91
92One of the ways with to protect the source from being modified is to have
93the directories under src_root: owned by a user or resource where the build
94username only has read access to it.
95
96
97Note to builders:
98
99GNV currently has a bug where configure scripts take a long time to run.
100Some of the configure steps take a while to complete, and on a 600 Mhz
101DS10 with IDE disks, taking an hour to run the CURL configure is normal.
102
103The following messages can be ignored and may get fixed in a future version
104of GNV.  The GNV$*.OPT files are used to find the libraries as many have
105different names on VMS than on Unix.  The Bash environment variable
106GNV_CC_QUALIFIERS can override all other settings for the C Compiler.
107
108? cc: No support for switch -warnprotos
109? cc: Unrecognized file toomanyargs
110? cc: Warning: library "ssl" not found
111? cc: Warning: library "crypto" not found
112? cc: Warning: library "gssapi" not found
113? cc: Warning: library "z" not found
114u unimplemented switch - ignored
115
116
117With these search lists set up and the properly, curl can be built by
118setting your default to PRJ_ROOT:[curl.packages.vms] and then issuing
119either the command:
120
121  $ @pcsi_product_gnv_curl.com
122
123or
124
125  $ @build_gnv_curl.com.
126
127The GNV configure procedure takes considerably longer than the DCL build
128procecure takes.  It is of use for testing the GNV build environment, and
129may not have been kept up to date.
130
131The pcsi_product_gnv_curl.com needs the following logical names which
132are described in the section below:
133
134  gnv_pcsi_producer
135  gnv_pcsi_producer_full_name
136  stage_root
137  vms_root1 (Optional if vms_root is on a NFS volume)
138  src_root1 (Optional if src_root is on a NFS volume)
139
140The pcsi_product_gnv_curl.com is described in more detail below.  It does
141the following steps.  The build steps are only done if they are needed to
142allow using either DCL or GNV based building procedures.
143
144  $ @build_vms list
145
146  $ @gnv_link_curl.com
147
148  $ @build_gnv_curl_release_notes.com
149
150  $ @backup_gnv_curl_src.com
151
152  $ @build_gnv_curl_pcsi_desc.com
153
154  $ @build_gnv_curl_pcsi_text.com
155
156  $ @stage_curl_install remove
157  $ @stage_curl_install
158
159  Then builds the kit.
160
161The build_gnv_curl.com command procedure does the following:
162
163  $ @setup_gnv_curl_build.com
164
165  $ bash gnv_curl_configure.sh
166
167  $ @clean_gnv_curl.com
168
169  $ bash make_gnv_curl_install.sh
170
171  $ @gnv_link_curl.com
172
173  $ @stage_curl_install.com
174
175  $ purge new_gnu:[*...]/log
176
177To clean up after a GNV based build to start over, the following commands are
178used:
179
180   $ bash
181   bash$ cd ../..
182   bash$ make clean
183   bash$ exit
184
185Then run the @clean_gnv_curl.com.  Use the parameter "realclean" if you are
186going to run the setup_gnv_curl_build.com and configure script again.
187
188   $ @clean_gnv_curl.com realclean
189
190If new public symbols have been added, adjust the file gnv_libcurl_symbols.opt
191to have the new symbols.  If the symbols are longer than 32 characters,
192then they will need to have the original be exact case CRC shortened and
193an alias in upper case with CRC shortened, in addition to having an exact
194case truncated alias and an uppercase truncated alias.
195
196The *.EXE files are not moved to the new_gnu: directory.
197
198After you are satisfied with the results of your build, you can move the
199files from new_gnu: to old_gnu: at your convenience.
200
201Building a PCSI kit for an architecture takes the following steps after
202making sure that you have a working build environment.
203
204Note that it requires manually creating two logical names as described
205below.  It is intentional that they be manually set.  This is for
206branding the PCSI kit based on who is making the kit.
207
208   1. Make sure that you have a staging directory that can be referenced
209      by the path STAGE_ROOT:[KIT]
210
211   2. Edit the file curl_release_note_start.txt or other text files to
212      reflect any changes.
213
214   3. Define the logical name GNV_PCSI_PRODUCER to indicate who is making
215      the distribution.  For making updates to an existing open source
216      kit you may need to keep the producer the same.
217
218   4. Define the logical name GNV_PCSI_PRODUCER_FULL_NAME to be your full
219      name or full name of your company.
220
221   5. If you are producing an update kit, then update the file
222      vms_eco_level.h by changing the value for the VMS_ECO_LEVEL macro.
223      This file is currently only used in building the PCSI kit.
224
225   6. Edit the file PCSI_GNV_CURL_FILE_LIST.TXT if there are new files added
226      to the kit.  These files should all be ODS-2 legal filenames and
227      directories.
228
229      A limitation of the PCSI kitting procedure is that when selecting files,
230      it tends to ignore the directory structure and assumes that all files
231      with the same name are the same file, so every file placed in the kit
232      must have a unique name.  Then a procedure needs to be added to the kit
233      to create an alias link on install and remove the link on remove.
234
235      Since at this time curl does not need this alias procedure, the steps
236      to automatically build it are not included here.
237
238      While newer versions of PCSI can support ODS-5 filenames, not all versions
239      of PCSI on systems that have ODS-5 filenames do.  So as a post install
240      step, the PCSI kit built by these steps does a rename to the correct
241      case as a post install step.
242
243   7. Edit the build_curl_pcsi_desc.com and build_curl_pcsi_text.com if you
244      have changed the version of ZLIB that curl is built against.
245
246   8. Prepare to backup the files for building the kit.
247
248      Note that if src_root: or vms_root: are NFS mounted disks, the
249      step of backing up the source files will probably hang or fail.
250
251      You need to copy the source files to VMS mounted disks and create
252      logical names SRC_ROOT1 and VMS_ROOT1 to work around this to to
253      reference local disks.  Make sure src_root1:[000000] and
254      vms_root1:[000000] exist and can be written to.
255
256      The command procedure compare_curl_source can be used to check
257      those directories and keep them up to date.
258
259         @compare_curl_source.com SRCBCK UPDATE
260
261         This compares the reference project source with the backup
262         staging directory for it and updates with any changes.
263
264         @compare_curl_source.com VMSBCK UPDATE
265
266         This compares the VMS specific source with the backup
267         staging directory for it and updates with any changes.
268
269         Leave off "UPDATE" to just check without doing any changes.
270
271      If you are not using NFS mounted disks and do not want to have a
272      separate directory for staging the sources for backup make sure
273      that src_root1: and vms_root1: do not exist.
274
275   9. Build the PCSI kit with @pcsi_product_gnv_curl.com
276
277       The following message is normal:
278          %PCSI-I-CANNOTVAL, cannot validate
279            EAGLE$DQA0:[stage_root.][kit]VMSPORTS-AXPVMS-CURL-V0731-0-1.PCSI;1
280          -PCSI-I-NOTSIGNED, product kit is not signed and therefore has
281          no manifest file
282
283       This will result in an uncompressed kit for the target platform.
284       On Alpha and Integrity, the pcsi_product_gnv_curl.com can be used with
285       the "COMPRESSED" parameter to build both a compressed and uncompressed
286       kits.
287
288Good Luck.
289