[odb-users] Error when compiling ODB compiler in 2.5.0-b25 on Windows

DEMBROGE Michael michael.dembroge at leica-geosystems.com
Tue Jan 9 15:09:57 EST 2024


Hello,

I'm getting the following error when I try to build the ODB compiler for ODB 2.5.0-b25:
odb-2.5.0-b.25\build\root.build:37:5: error: ODB compiler can only be built with GCC.

The issue is that I'm configuring it to use gcc, but for some reason, in Windows, it's setting the compiler to 'msvc' (see below).

Here is a summary of my procedure (from https://codesynthesis.com/products/odb/doc/install-build2.xhtml):

Step 1: create folder -
c:\odb-build>bpkg create -d odb-mingw cxx^
More? Config.cxx=gcc^
More? Config.cc.coptions=-O2^
More? Config.install.root=c:\build2
created new configuration in C:\odb-build\odb-mingw\
  uuid: e7166948-dcad-4427-a7b4-9301b12691b0
  type: target

Step 2: download source
C:\odb-build>cd odb-mingw
C:\odb-build\odb-mingw>bpkg build odb at https://pkg.cppget.org/1/beta<mailto:odb at https://pkg.cppget.org/1/beta>

added pkg:cppget.org/beta
fetching pkg:cppget.org/beta
warning: authenticity of the certificate for repository pkg:cppget.org/beta cannot be established
certificate is for **cppget.org, "Code Synthesis" admin at cppget.org<mailto:admin at cppget.org>
certificate SHA256 fingerprint:
70:64:FE:E4:E0:F3:60:F1:B4:51:E1:FA:12:5C:E0:B3:DB:DF:96:33:39:B9:2E:E5:C2:68:63:4C:A6:47:39:43
trust this certificate? [y/n] y
fetching pkg:cppget.org/testing (complements pkg:cppget.org/beta)
fetching pkg:cppget.org/stable (complements pkg:cppget.org/testing)
  new libstudxml/1.1.0-b.10+2 (required by odb)
  new libcutl/1.11.0-b.9+1 (required by odb)
  new odb/2.5.0-b.25
continue? [Y/n] Y
libstudxml-1.1.0-b.10+2.tar.gz:
###### ... ###### 100.0%
fetched libstudxml/1.1.0-b.10+2
unpacked libstudxml/1.1.0-b.10+2
libcutl-1.11.0-b.9+1.tar.gz:
###### ... ###### 100.0%
fetched libcutl/1.11.0-b.9+1
unpacked libcutl/1.11.0-b.9+1
odb-2.5.0-b.25.tar.gz:
###### ... ###### 100.0%
fetched odb/2.5.0-b.25
unpacked odb/2.5.0-b.25
configured libstudxml/1.1.0-b.10+2
configured libcutl/1.11.0-b.9+1
odb-2.5.0-b.25\build\root.build:37:5: error: ODB compiler can only be built with GCC
info: while configuring odb

I then found the line in root.build where this test was failing:
if ($cxx.id != 'gcc')
    fail 'ODB compiler can only be built with GCC'

My next step was to make a slight modification to root.build to output $cxx.id:
if ($cxx.id != 'gcc')
    fail 'ODB compiler can only be built with GCC. cxx.id = ' $cxx.id

I then re-ran the 'build' command:
C:\odb-build\odb-mingw>bpkg build odb at https://pkg.cppget.org/1/beta<mailto:odb at https://pkg.cppget.org/1/beta>
fetching pkg:cppget.org/beta
fetching pkg:cppget.org/testing (complements pkg:cppget.org/beta)
fetching pkg:cppget.org/stable (complements pkg:cppget.org/testing)
odb-2.5.0-b.25\build\root.build:37:5: error: ODB compiler can only be built with GCC. cxx.id =  msvc
info: while configuring odb

Does anyone have any ideas as to what is going wrong? I have installed gcc, but maybe it's missing something else?

TIA,

Mike Dembroge



More information about the odb-users mailing list