building 32bits library always fails

Do you have a question about makefiles, a compiler or IDE you are using and need to know how to set it up for wxWidgets or why it doesn't compile but other IDE's do ? Post your questions here.
El_isra
Knows some wx things
Knows some wx things
Posts: 34
Joined: Tue Apr 13, 2021 1:10 am

Re: building 32bits library always fails

Post by El_isra » Tue Jul 20, 2021 2:04 pm

ONEEYEMAN wrote:
Mon Jul 19, 2021 11:51 pm
Hi,
What is your version of GCC and where did you get it?
What was you build command for the "master"?

Thank you.
build command on first message


output of gcc.exe -v (piped to clip.exe)

Code: Select all

Usando especificaciones internas.
COLLECT_GCC=C:\TDM-GCC-32\bin\gcc
COLLECT_LTO_WRAPPER=C:/TDM-GCC-32/bin/../libexec/gcc/mingw32/10.3.0/lto-wrapper.exe
Objetivo: mingw32
Configurado con: ../../../src/gcc-git-10.3.0/configure --build=mingw32 --enable-languages=ada,c,c++,fortran,jit,lto,objc,obj-c++ --enable-libgomp --enable-lto --enable-
graphite --enable-libstdcxx-debug --enable-threads=posix --enable-version-specific-runtime-libs --enable-fully-dynamic-string --enable-libstdcxx-threads --disable-build
-format-warnings --with-gnu-ld --disable-werror --enable-nls --enable-mingw-wildcard --disable-win32-registry --disable-symvers --enable-large-address-aware --enable-cx
x-flags='-fno-function-sections -fno-data-sections -DWINPTHREAD_STATIC' --enable-libstdcxx-filesystem-ts=yes --enable-libstdcxx-time=yes --enable-checking=release --pre
fix=/mingw32tdm --with-local-prefix=/mingw32tdm --with-pkgversion=tdm-1 --enable-sjlj-exceptions --with-bugurl=https://github.com/jmeubank/tdm-gcc/issues
Modelo de hilos: posix
Algoritmos de compresión LTO admitidos: zlib zstd
gcc versión 10.3.0 (tdm-1)

ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 5212
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: building 32bits library always fails

Post by ONEEYEMAN » Tue Jul 20, 2021 3:24 pm

Hi,
So what happens when you start over and drop the "MONOLITHIC=1" from the build command?

I mean delete the whole wxWidgets directory, unpack it again and build it without that option in command. Does it give you exactly the same error?

Thank you.

stahta01
Super wx Problem Solver
Super wx Problem Solver
Posts: 462
Joined: Fri Nov 03, 2006 2:00 pm

Re: building 32bits library always fails

Post by stahta01 » Tue Jul 20, 2021 3:31 pm

You need to either

1. Use an Compiler that is older that works with that version of wxWidgets
2. Figure out what compiler option is needed
3. Apply the patch I posted
4. Build the wxWidgets 3.0 branch instead of the tar file

Tim S.

stahta01
Super wx Problem Solver
Super wx Problem Solver
Posts: 462
Joined: Fri Nov 03, 2006 2:00 pm

Re: building 32bits library always fails

Post by stahta01 » Tue Jul 20, 2021 7:25 pm

You might try the C++ option of "-fpermissive" as in CXXFLAGS=-fpermissive

But, that might not be the best option. And, it might not work.

Tim S.

stahta01
Super wx Problem Solver
Super wx Problem Solver
Posts: 462
Joined: Fri Nov 03, 2006 2:00 pm

Re: building 32bits library always fails

Post by stahta01 » Wed Jul 21, 2021 11:53 am

The option "-fpermissive" did nothing to fix error.

Tim S.

Code: Select all

g++ -c -o gcc1030MSYS2_mswudll\mediadll_mediactrl_am.o  -O2 -mthreads  -DHAVE_W32API_H -D__WXMSW__   -DNDEBUG    -D_UNICODE  -I..\..\lib\gcc1030MSYS2_dll\mswu -I..\..\include  -W -Wall -DWXBUILDING -I..\..\src\tiff\libtiff -I..\..\src\jpeg -I..\..\src\png -I..\..\src\zlib -I..\..\src\regex -I..\..\src\expat\lib -DWXUSINGDLL -DWXMAKINGDLL_MEDIA   -Wno-ctor-dtor-privacy -D__MINGW64_TOOLCHAIN__ -std=gnu++11 -fpermissive -Wno-deprecated-copy -MTgcc1030MSYS2_mswudll\mediadll_mediactrl_am.o -MFgcc1030MSYS2_mswudll\mediadll_mediactrl_am.o.d -MD -MP ../../src/msw/mediactrl_am.cpp
../../src/msw/mediactrl_am.cpp: In member function 'void wxAMMediaEvtHandler::OnActiveX(wxActiveXEvent&)':
../../src/msw/mediactrl_am.cpp:2234:10: error: narrowing conversion of '4294966687' from 'unsigned int' to 'long int' [-Wnarrowing]
 2234 |     case 0xfffffd9f: // readystatechange in IActiveMovie2 and IMediaPlayer
      |          ^~~~~~~~~~

stahta01
Super wx Problem Solver
Super wx Problem Solver
Posts: 462
Joined: Fri Nov 03, 2006 2:00 pm

Re: building 32bits library always fails

Post by stahta01 » Wed Jul 21, 2021 1:00 pm

Applying the patch I suggested fixed the building.

The build command I used is

Code: Select all

mingw32-make -f makefile.gcc \
  VENDOR=$_COMPILER_VERSION \
  COMPILER_VERSION=$_COMPILER_VERSION \
  CPPFLAGS="-D__MINGW64_TOOLCHAIN__" \
  CXXFLAGS="-std=gnu++11 -fpermissive -Wno-deprecated-copy" \
  MONOLITHIC=0 SHARED=1 UNICODE=1 BUILD=release
Your basic build command "mingw32-make -j4 -f makefile.gcc CXXFLAGS="-std=gnu++11" BUILD=debug UNICODE=1 SHARED=0 MONOLITHIC=1"

My basic build command "mingw32-make -f makefile.gcc CXXFLAGS="-std=gnu++11 -fpermissive -Wno-deprecated-copy" MONOLITHIC=0 SHARED=1 UNICODE=1 BUILD=release"

Added "-Wno-deprecated-copy" to reduce all the warnings to much smaller amount
Added "-fpermissive" I think this was needed in the past but I forget why
Building shared because it is what I want and shared is harder to build; if shared builds static almost always builds
Building release because it is what I want; after building release I build the debug version
Unicode and Multilib is default; but, I specify it to remind myself that is what I am building

Edit: In wxWidgets 3.1 the addition of [CPPFLAGS="-D__MINGW64_TOOLCHAIN__"] helps options in wx/setup.h to work correctly when build with an MinGW64 based mingw GCC.

Tim S.

El_isra
Knows some wx things
Knows some wx things
Posts: 34
Joined: Tue Apr 13, 2021 1:10 am

Re: building 32bits library always fails

Post by El_isra » Fri Jul 23, 2021 12:26 am

I just gave up.
32bits consumers will have to buy another PC, i'm not wasting another %$@%ing seccond on this 32-bit shit

stahta01
Super wx Problem Solver
Super wx Problem Solver
Posts: 462
Joined: Fri Nov 03, 2006 2:00 pm

Re: building 32bits library always fails

Post by stahta01 » Fri Jul 23, 2021 8:44 pm

El_isra wrote:
Fri Jul 23, 2021 12:26 am
I just gave up.
32bits consumers will have to buy another PC, i'm not wasting another %$@%ing seccond on this 32-bit shit
If you wish to program in the real world you will in time have to learn how to read patch files!
Taking at most 5 minutes to hand edit the file and see that it fixed the problem.

You are now a person I consider a waste of time to help!

Tim S.

El_isra
Knows some wx things
Knows some wx things
Posts: 34
Joined: Tue Apr 13, 2021 1:10 am

Re: building 32bits library always fails

Post by El_isra » Sat Jul 24, 2021 7:35 pm

stahta01 wrote:
Fri Jul 23, 2021 8:44 pm
El_isra wrote:
Fri Jul 23, 2021 12:26 am
I just gave up.
32bits consumers will have to buy another PC, i'm not wasting another %$@%ing seccond on this 32-bit shit
If you wish to program in the real world you will in time have to learn how to read patch files!
Taking at most 5 minutes to hand edit the file and see that it fixed the problem.

You are now a person I consider a waste of time to help!

Tim S.
Compilation fails on every wxWidgets version that i've tried on this shitty toolchain, not only 3.0.5.... 3.1.5 and 3.1.4 too

ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 5212
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: building 32bits library always fails

Post by ONEEYEMAN » Sat Jul 24, 2021 8:41 pm

Hi,
Did you try to apply a patch from Tim and recompile?

Thank you.

stahta01
Super wx Problem Solver
Super wx Problem Solver
Posts: 462
Joined: Fri Nov 03, 2006 2:00 pm

Re: building 32bits library always fails

Post by stahta01 » Sat Jul 24, 2021 9:31 pm

ONEEYEMAN wrote:
Sat Jul 24, 2021 8:41 pm
Hi,
Did you try to apply a patch from Tim and recompile?

Thank you.
Should not have to recompile; just edit and make should work.

The patch fixed that problem for me; if he refuses to apply it then it is his problem.

Tim S.

Post Reply