File: README_gnat-4.6.3 Download this file ================== darnassus.sceen.net:~gnu_srs/gnat-4.6/README_gnat-4.6.3 Remaining problems: 1) the default GNU/Hurd gcc complier driver does not recognize ada libraries: fixed by: debian_rules.defs_ada.diff: Bugs #667662 and #668268. 1a) the default GNU/Hurd gcc compiler does not build the GNU locales deb: Fixed in gcc-4.6.3-3 and gcc-4.7.0-3: Bugs #668425 and #668426 2) built binaries segfaults at startup (dynamic and static: sjlj and zcx): Solved by modifying s-taprop-gnu.adb, s-osinte-gnu.adb and s-osinte-gnu.ads! Download and install the built gnat debs: ========================================= darnassus.sceen.net:~gnu_srs/gnat-4.6/debs/*.deb gnat-4.6_4.6.3-2_hurd-i386.deb libgnatprj4.6-dbg_4.6.3-2_hurd-i386.deb gnat-4.6-base_4.6.3-2_hurd-i386.deb libgnatprj4.6-dev_4.6.3-2_hurd-i386.deb gnat-4.6-sjlj_4.6.3-2_hurd-i386.deb libgnatvsn4.6_4.6.3-2_hurd-i386.deb libgnat-4.6_4.6.3-2_hurd-i386.deb libgnatvsn4.6-dbg_4.6.3-2_hurd-i386.deb libgnat-4.6-dbg_4.6.3-2_hurd-i386.deb libgnatvsn4.6-dev_4.6.3-2_hurd-i386.deb libgnatprj4.6_4.6.3-2_hurd-i386.deb dpkg -i *.deb (or select the essential subset) apt-get build-dep gnat-4.6 (apt-get install gnat) Download the patches ==================== darnassus.sceen.net:~gnu_srs/gnat-4.6/patches/*.diff Debian specific patches: (Enables Ada: debian_rules.defs_ada.diff: Bugs reported) (Enables GNU locale: debian_rules.defs_locales.diff: Fixed already) debian_rules.patch.diff ada-bug564232_new.diff ada-libgnatprj_new.diff Upstream patches: gcc_ada_gcc-interface_Makefile.in.diff ada-s-taprop-gnu.adb.diff ada-s-osinte-gnu.adb.diff ada-s-osinte-gnu.ads.diff Install the gnat-4.6 sources ============================= cd .../gnat-4.6 apt-get source gnat-4.6 (4.6_4.6.3-2) unpacks to gnat-4.6-4.6.3 debian/ _MIN/ Installing the gcc-4.6 sources: =============================== Not recommended, since the Hurd version has the old patches in the patches directory already! As root: apt-get source gcc-4.6 (4.6_4.6.3-1+hurd.1) Installs gcc-4.6 at /usr/share and /usr/src/gcc-4.6 debian gcc-4.6.3-dfsg.tar.xz patches pwd /home/srs/DEBs/gnat/gnat-4.6.3/gnat-4.6-4.6.3 ln -s /usr/src/gcc-4.6/gcc-4.6.3-dfsg.tar.xz . Unpacking the gcc-4.6 sources ============================= debian/rules unpack 2>&1 | tee ../unpack_gnat-4.6.3.log creates stamps/ 01-unpack-stamp 01-unpack-stamp-gcc-4.6.3-dfsg.tar.xz Alternately: Installing the gcc-4.6 sources: ============================================ apt-get source gcc-4.6=4.6.3-3 Unpacks to: gcc-4.6-4.6.3 Unpacking the gcc-4.6 sources ============================= cd gnat-4.6-4.6.3 ln -s ../gcc-4.6/gcc-4.6-4.6.3/ . debian/rules unpack 2>&1 | tee ../unpack_gnat-4.6.3.log creates stamps/01-unpack-stamp ln -s gcc-4.6-4.6.3/gcc-4.6.3-dfsg.tar.xz . debian/rules unpack 2>&1 | tee -a ../unpack_gnat-4.6.3.log creates stamps/01-unpack-stamp-gcc-4.6.3-dfsg.tar.xz Patching ======== Copy the following patches to debian/patches: ada-bug564232_new.diff ada-libgnatprj_new.diff debian_rules.patch.diff gcc_ada_gcc-interface_Makefile.in.diff ada-s-osinte-gnu.adb.diff ada-s-osinte-gnu.ads.diff ada-s-taprop-gnu.adb.diff Apply patches: (does not work, ada not enabled yet) Add to the beginning of debian/patches/series: debian_rules.defs_ada.diff -p1 debian_rules.patch.diff -p1 Does not work: the patches file is overwritten!! Enabling and applying the Hurd-specific patches: ================================================ debian/rules.defs: Enable ada for GNU/Hurd manually: - ada_no_systems := gnu knetbsd-gnu + ada_no_systems := Add patches for GNU/Hurd manually: debian/rules.patch: ifeq ($(with_libgnat),yes) debian_patches += \ ada-link-lib \ ada-libgnatvsn \ - ada-libgnatprj \ + ada-libgnatprj_new \ ada-acats ifeq ($(with_gnat_zcx)-$(with_gnat_sjlj),yes-yes) debian_patches += \ ada-sjlj endif endif ifeq ($(DEB_TARGET_ARCH_OS),kfreebsd) debian_patches += ada-kfreebsd-gnu \ - ada-bug564232 + ada-bug564232_new + endif + + ifeq ($(DEB_TARGET_ARCH_OS),hurd) + debian_patches += \ + ada-kfreebsd-gnu \ + ada-bug564232_new \ + ada-libgnatprj_new \ + gcc_ada_gcc-interface_Makefile.in \ + ada-s-osinte-gnu.adb \ + ada-s-osinte-gnu.ads \ + s-taprop-gnu.ads endif ifeq ($(DEB_TARGET_ARCH_OS),hurd) - debian_patches += hurd-pthread + debian_patches += hurd-pthread hurd-fixes endif debian/rules patch 2>&1 | tee ../patch_gnat-4.6.3.log creates stamps/ 02-patch-stamp 02-series-stamp FIXME: Delete this file when applying patches again: It controls updating of the src/*/configure.ac to src/*/configure??? CHECK!! FIXME: autogen is not installed! Needed?? >From patch_gnat-4.6.3.log: cd /home/srs/DEBs/gnat-4.6/gnat-4.6-4.6.3/src/fixincludes && ./genfixes ./genfixes: 1: ./genfixes: autogen: not found AutoGen appears to be out of date or not correctly installed. Please download and install: ftp://gcc.gnu.org/pub/gcc/infrastructure/autogen.tar.gz cat stamps autotools_files da4cbfef9bc80939fd3b8d5633760829 ./src/boehm-gc/configure.ac 5bb1e804ce8dfef6707776dc5545f5bb ./src/configure.ac <- UPDATE f2d1a9bf0648d059eb3c7a3c2d5b045e ./src/gcc/configure.ac <- UPDATE 5fdfc9508e8b943cc51720e303c5f0e1 ./src/libffi/configure.ac <- UPDATE 68991723439735a382f55f368a845836 ./src/libgnatprj/configure.ac <- UPDATE ab012655ff764cf0f0d49ea16e7e9afa ./src/libiberty/configure.ac <- UPDATE f24e863bb5540f5a732309925f1e9e9d ./src/libjava/classpath/configure.ac b1f8f6f05678a19cbab83e36f5b87e14 ./src/libjava/configure.ac Unapply patches if needed: debian/rules unpatch 2>&1 | tee ../unpatch_gnat-4.6.3.log Patch hurd-pthread.diff does not remove cleanly (refresh it or enforce with -f) quilt pop -af rm stamps/02-series-stamp rm stamps/02-patch-stamp debian/rules patch 2>&1 | tee ../patch_gnat-4.6.3_1.log creates the stamps and the debian/patches/series file. quilt pop -a Check: quilt applied: (should show all patches below) ada-driver-check.diff ada-gcc-name.diff ada-default-project-path.diff ada-symbolic-tracebacks.diff ada-library-project-files-soname.diff ada-link-lib.diff ada-libgnatvsn.diff ada-libgnatprj_new.diff ada-acats.diff ada-sjlj.diff ada-kfreebsd-gnu.diff ada-bug564232_new.diff gcc_ada_gcc-interface_Makefile.in.diff ada-mips.diff ada-s-osinte-gnu.adb.diff ada-s-osinte-gnu.ads.diff ada-s-taprop-gnu.adb.diff hurd-pthread.diff hurd-changes.diff hurd-fixes.diff (gcc-4.6 only) Configuring =========== debian/rules configure 2>&1 | tee ../configure_gnat-4.6.3.log Creates build/ Makefile, config.* etc! Building ======== debian/rules build 2>&1 | tee ../build_gnat-4.6.3.log Compile stops, reason: src/libgnatprj/configure.ac is newer than src/libgnatprj/configure! Find out why autoconf2.64 is not run here?? Make sure every patch changing a configure.ac creates a new configure: (cd src; autoconf2.64): ada-link-lib.diff (cd src/libgnatprj; autoconf2.64): ada-libgnatvsn_new.diff (cd src/gcc; autoconf2.64) (cd src/libffi; autoconf2.64) (cd src/libiberty; autoconf2.64) debian/rules build 2>&1 | tee -a ../build_gnat-4.6.3.log Installing files ================ fakeroot debian/rules install 2>&1 | tee ../install_gnat-4.6.3.log Creating debs ============= fakeroot debian/rules binary 2>&1 | tee ../binary_gnat-4.6.3.log DONE TO HERE: 2012-04-11 Of course the build can be made in one stage (if all the above steps succeeds) dpkg-buildpackage -b (or whatever)