OS/2, eCS & ArcaOS - Technical > Programming

Updated GCC Builds

<< < (2/6) > >>

Dave Yeo:

--- Quote from: Rob on May 03, 2021, 04:20:40 am ---Thanks Paul.  Really cool to see a GCC 11 on here!


I grabbed the 11.1 build and tried to get it to work with cmake, and ran into an error in the "trycompile" phase where cmake introspects the compiler by building things.

Here's how to reproduce it:
https://github.com/wwiv/os2/blob/main/tests/cmake/readme.txt

Hope this helps.

--- End quote ---

I tried this, keep getting errors involving the environment. I'm not used to cmake and did try setting these environment variables

--- Code: ---[K:\work\os2\tests\cmake\_b]cmake --debug-trycompile  ..
debug trycompile on
CMake Error at W:/usr/share/cmake/Modules/CMakeDetermineCCompiler.cmake:49 (mess
age):
  Could not find compiler set in environment variable CC:

  C:\usr\local11\bin\gcc.
Call Stack (most recent call first):
  CMakeLists.txt:1 (project)


CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!
See also "K:/work/os2/tests/cmake/_b/CMakeFiles/CMakeOutput.log".

--- End code ---

Rob:

--- Quote from: Dave Yeo on May 03, 2021, 04:40:29 am ---
I tried this, keep getting errors involving the environment. I'm not used to cmake and did try setting these environment variables


--- End quote ---

Thanks. Here's what I tried with the cc11.cmd to set CC and CXX (so cmake can find it).  This assumes the GCC 11.1 stayed in \usr\local11


--- Code: ---set CXX=C:\usr\local11\bin\g++
set CC=C:\usr\local11\bin\gcc

cmake --debug-trycompile  ..

--- End code ---

Dave Yeo:
Tried building SeaMonkey with 10.3.0. made it to linking xul.dll where it died with,

--- Code: ---82:56.24 weakld: error: Unresolved symbol (UNDEF) '__ZN7gfxFont13GetShapedWordIhEEP13gfxShapedWordP10gfxContextPKT_jjibijP18gfxTextPerfMetrics'.
82:56.24 weakld: info: The symbol is referenced by:
82:56.24     Y:\work\cc45-git\obj-sm\gfx\thebes\Unified_cpp_gfx_thebes1.obj
82:56.24 Ignoring unresolved externals reported from weak prelinker.
82:56.24 Error! E2028: __ZN7gfxFont13GetShapedWordIhEEP13gfxShapedWordP10gfxContextPKT_jjibijP18gfxTextPerfMetrics is an undefined reference
82:56.25 file Y:\work\cc45-git\obj-sm\gfx\thebes\Unified_cpp_gfx_thebes1.obj(Y:\work\cc45-git\obj-sm\gfx\thebes\Unified_cpp_gfx_thebes1.cpp): undefined symbol __ZN7gfxFont13GetShapedWordIhEEP13gfxShapedWordP10gfxContextPKT_jjibijP18gfxTextPerfMetrics
82:56.25 make.EXE[4]: *** [xul.dll] Error 1

--- End code ---

Gcc 9.2.0 seems to produce and link

--- Code: ---0001:011aadb0* __ZN7gfxFont13GetShapedWordIhEEP13gfxShapedWordP10gfxContextPKT_jjibijP18gfxTextPerfMetrics$w$JhD8ijzLgS70u5P91

--- End code ---

in both

--- Code: ---\gfx\thebes\Unified_cpp_gfx_thebes0.obj
\gfx\thebes\Unified_cpp_gfx_thebes1.obj

--- End code ---

whereas 10.3.0 only has the symbol in thebes0.obj

Dave Yeo:

--- Quote from: Rob on May 03, 2021, 04:49:50 am ---
--- Quote from: Dave Yeo on May 03, 2021, 04:40:29 am ---
I tried this, keep getting errors involving the environment. I'm not used to cmake and did try setting these environment variables


--- End quote ---

Thanks. Here's what I tried with the cc11.cmd to set CC and CXX (so cmake can find it).  This assumes the GCC 11.1 stayed in \usr\local11


--- Code: ---set CXX=C:\usr\local11\bin\g++
set CC=C:\usr\local11\bin\gcc

cmake --debug-trycompile  ..

--- End code ---

--- End quote ---

OK, that works fine. For 11.1.0,

--- Code: ---[K:\work\os2\tests\cmake\_b]cmake --debug-trycompile ..
debug trycompile on
-- The C compiler identification is GNU 11.1.0
-- The CXX compiler identification is GNU 11.1.0
-- Check for working C compiler: W:/usr/local11/bin/gcc.exe
-- Check for working C compiler: W:/usr/local11/bin/gcc.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: W:/usr/local11/bin/g++.exe
-- Check for working CXX compiler: W:/usr/local11/bin/g++.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: K:/work/os2/tests/cmake/_b

--- End code ---

With similar output for 10.3.0. My guess is that you didn't set up your environment correctly. Here's my gcc11env.cmd.

--- Code: ---set PATH=W:\usr\local11\libexec\gcc\i686-pc-os2-emx\11.1.0;W:\usr\local11\bin;%PATH%
set BEGINLIBPATH=W:\usr\local11\lib;W:\usr\lib;%BEGINLIBPATH%
set LIBPATHSTRICT=T
set C_INCLUDE_PATH=W:/usr/local11/lib/gcc/i686-pc-os2-emx/11.1.0/include;W:/usr/local11/include;W:/usr/include;%C_INCLUDE_PATH%
set CPLUS_INCLUDE_PATH=W:/usr/local11/include/c++/11.1.0;W:/usr/local11/include/c++/11.1.0/i686-pc-os2-emx;W:/usr/local11/include/c++/11.1.0/backward;W:/usr/local11/include;W:/usr/include;%CPLUS_INCLUDE_PATH%
set LIBRARY_PATH=W:/usr/local11/lib/gcc/i686-pc-os2-emx/11.1.0;W:/usr/local11/lib;W:/usr/lib;%LIBRARY_PATH%

--- End code ---
edit, fixed gcc11env.

Rob:

--- Quote from: Dave Yeo on May 03, 2021, 04:40:29 am ---With similar output for 10.3.0. My guess is that you didn't set up your environment correctly. Here's my gcc11env.cmd.

--- End quote ---

Your guess was spot on.  I missed that step since I didn't need it for the built-in GCC didn't think to setup the environment for 11.  Thanks for the help!

-r

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version