Opened 5 months ago

Closed 5 months ago

#843 closed defect (fixed)

running bootstrap.sh on new machine

Reported by: rkolka Owned by: osgeo4w-dev@…
Priority: normal Component: Package
Version: Keywords: gsl
Cc:

Description (last modified by rkolka)

I tried to run bootstrap.sh on a fresh machine. I've overcome 3 build errors, but I'm currently unable to overcome the 4th. That is when building gsl. Spcifically src\gsl\gsl\build.vc\gslhdrs\gslhdrs.vcxproj. Build log attached.

PreBuildEvent:
  copy ..\gsl_version.h ..\..\gsl
  :VCEnd
  The system cannot find the file specified.

Before that, I had to make the following changes.


1.

/scripts/genini:41
-my $alllicenses = 0;
+my $alllicenses = 1;

Otherwise I get:

license.map not found at /cygdrive/d/Code/OSGeo4W/scripts/genini line 64.

2.

/src/apache/osgeo4w/package.sh:2
-export V=2.4.58
+export V=2.4.61
/src/apache/osgeo4w/package.sh:16
-z=httpd-$V-240131-win64-VS17.zip
+z=httpd-$V-240703-win64-VS17.zip

Otherwise I get:

unzip:  cannot find zipfile directory in one of httpd-2.4.58-240131-win64-VS17.zip ...

3.

/src/gsl/osgeo4w/package.sh:12
-[ -f master.tar.gz ] || wget https://github.com/BrianGladman/gsl/archive/master.tar.gz
+[ -f vs_build.tar.gz ] || wget https://github.com/BrianGladman/gsl/archive/vs_build.tar.gz

/src/gsl/osgeo4w/package.sh:13
-[ -f ../$P/build.vc ] || tar -C .. -xzf master.tar.gz --xform "s,^gsl-master,$P,"
+[ -f ../$P/build.vc ] || tar -C .. -xzf vs_build.tar.gz --xform "s,^gsl-vs_build,$P,"

Otherwise I get

package.sh: line 19: cd: ../gsl/build.vc: No such file or directory

Attachments (1)

log.txt (12.2 KB ) - added by rkolka 5 months ago.
build log

Download all attachments as: .zip

Change History (8)

by rkolka, 5 months ago

Attachment: log.txt added

build log

comment:1 by rkolka, 5 months ago

Description: modified (diff)

comment:2 by rkolka, 5 months ago

I was able to generate src/gsl/gsl/gsl_version.h by making the 4 changes below.

Got gsl compilation running.

Then got lots of linking error LNK2005 -s.

  ...
  vector.obj : error LNK2005: gsl_vector_ushort_set already defined in eval.obj [C:\Code\OSGeo4W\src\gsl\gsl\build.vc\gsldll\gsldll.vcxproj]
  C:\Code\OSGeo4W\src\gsl\gsl\build.vc\..\dll\x64\Release\gsl.dll : fatal error LNK1169: one or more multiply defined symbols found [C:\Code\OSGeo4W\src\gsl\gsl\build.vc\gsldll\gsldll.vcxproj]

    482 Warning(s)
    130 Error(s)

Changes I made to OSGeo4W code:

  1. Installing autoconf, automake and libtool.
    /bootstrap.cmd:10
    -       -P "bison,flex,poppler,doxygen,git,unzip,tar,diffutils,patch,curl,wget,flip,p7zip,make,osslsigncode,mingw64-x86_64-gcc-core,catdoc,enscript,mingw64-x86_64-binutils,perl-Data-UUID,ruby=2.6.4-1,perl-YAML-Tiny"
    +       -P "bison,flex,poppler,doxygen,git,unzip,tar,diffutils,patch,curl,wget,flip,p7zip,make,osslsigncode,mingw64-x86_64-gcc-core,catdoc,enscript,mingw64-x86_64-binutils,perl-Data-UUID,ruby=2.6.4-1,perl-YAML-Tiny,autoconf,automake,libtool"
    

  1. Adding autogen and configure steps. (NB! I mostly do not know what I'm doing here).
    /src/gsl/osgeo4w/package.sh:18
    +[ -f ../$P/configure ] || ( cd ../$P && ./autogen.sh )
    +[ -f ../$P/gsl_version.h ] || ( cd ../$P && ./configure --enable-maintainer-mode LD=dummy )
    +
    

  1. Fixing file check to directory check
    /src/gsl/osgeo4w/package.sh:13
    -[ -f ../$P/build.vc ] || tar -C .. -xzf vs_build.tar.gz --xform "s,^gsl-vs_build,$P,"
    +[ -d ../$P/build.vc ] || tar -C .. -xzf vs_build.tar.gz --xform "s,^gsl-vs_build,$P,"
    

Changes I made to gsl code.

  1. Removing < PreBuildEvent >s from gslhdrs.vcxproj because it looked like no-op and it still failed somehow. (Wrong CWD for msbuild?)
    /src/gsl/gsl/build.vc/gslhdrs/gslhdrs.vcxproj
    -    <PreBuildEvent>
    -      <Command>copy ..\gsl_version.h ..\..\gsl</Command>
    -    </PreBuildEvent>
    

comment:3 by rkolka, 5 months ago

OK, adding /FORCE:MULTIPLE to gsldll.vcxproj <Link /> sections got me over LNK1169.

/src/gsl/gsl/build.vc/gsldll/gsldll.vcxproj
      </DataExecutionPrevention>
+     <AdditionalOptions>/FORCE:MULTIPLE %(AdditionalOptions)</AdditionalOptions>
    </Link>

comment:5 by rkolka, 5 months ago

This can be closed. I managed to build most things. Most crucially gdal, qgis-ltr, qgis-ltr-dev. Building Qt6 failed with fatal error C1002: compiler is out of heap space (12GB of RAM) Some python-... things failed. etc.

I found 1 important changed location.

/src/arrow-cpp/osgeo4w/package.sh
-[ -f apache-arrow-$V.tar.gz ] || wget https://dist.apache.org/repos/dist/release/arrow/arrow-$V/apache-arrow-$V.tar.gz
+[ -f apache-arrow-$V.tar.gz ] || wget https://archive.apache.org/dist/arrow/arrow-$V/apache-arrow-$V.tar.gz

in reply to:  5 comment:6 by jef, 5 months ago

Replying to rkolka:

This can be closed. I managed to build most things. Most crucially gdal, qgis-ltr, qgis-ltr-dev. Building Qt6 failed with fatal error C1002: compiler is out of heap space (12GB of RAM) Some python-... things failed. etc.

Same here - might actually be a RAM issue - the original build machine had 64GB.

I found 1 important changed location.

/src/arrow-cpp/osgeo4w/package.sh
-[ -f apache-arrow-$V.tar.gz ] || wget https://dist.apache.org/repos/dist/release/arrow/arrow-$V/apache-arrow-$V.tar.gz
+[ -f apache-arrow-$V.tar.gz ] || wget https://archive.apache.org/dist/arrow/arrow-$V/apache-arrow-$V.tar.gz

arrow-cpp updated to 17.0.0 in https://github.com/jef-n/OSGeo4W/commit/8e86abd9d8c228f40ef168aafdcdba7950d5bcdf

comment:7 by jef, 5 months ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.