curl_gnv_build_steps.txt 11 KB

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