Building Panda3D with MinGW 32-bit (and MinGW 64-bit)

MinGW Version: GNU Make 4.2.1, Built for i686-w64-mingw32, 32-bit
Operating System: Windows 10, 64-bit

Hello,

I configured Panda3D in CMake GUI. I tried to build it:

image

But I have errors:

All errors:

C:\Temp\panda3d-master\dist>mingw32-make
Scanning dependencies of target p3dtoolbase
[  0%] Building CXX object cmake/dtool/src/dtoolbase/CMakeFiles/p3dtoolbase.dir/Unity/unity_0_cxx.cxx.obj
In file included from C:/Temp/panda3d-master/dtool/src/dtoolbase/atomicAdjustI386Impl.h:53,
                 from C:/Temp/panda3d-master/dtool/src/dtoolbase/atomicAdjustI386Impl.cxx:14,
                 from C:\Temp\panda3d-master\dist\cmake\dtool\src\dtoolbase\CMakeFiles\p3dtoolbase.dir\Unity\unity_0_cxx.cxx:6:
C:/Temp/panda3d-master/dtool/src/dtoolbase/atomicAdjustI386Impl.I: In static member function 'static void AtomicAdjustI386Impl::inc(volatile Integer&)':
C:/Temp/panda3d-master/dtool/src/dtoolbase/atomicAdjustI386Impl.I:23:9: error: expected '(' before '{' token
   __asm {
         ^
         (
C:/Temp/panda3d-master/dtool/src/dtoolbase/atomicAdjustI386Impl.I:24:5: error: 'mov' was not declared in this scope
     mov edx, var_ptr;
     ^~~
C:/Temp/panda3d-master/dtool/src/dtoolbase/atomicAdjustI386Impl.I:25:5: error: 'lock' was not declared in this scope
     lock inc dword ptr [edx];
     ^~~~
C:/Temp/panda3d-master/dtool/src/dtoolbase/atomicAdjustI386Impl.I:25:5: note: suggested alternative: 'clock'
     lock inc dword ptr [edx];
     ^~~~
     clock
C:/Temp/panda3d-master/dtool/src/dtoolbase/atomicAdjustI386Impl.I: In static member function 'static bool AtomicAdjustI386Impl::dec(volatile Integer&)':
C:/Temp/panda3d-master/dtool/src/dtoolbase/atomicAdjustI386Impl.I:46:9: error: expected '(' before '{' token
   __asm {
         ^
         (
C:/Temp/panda3d-master/dtool/src/dtoolbase/atomicAdjustI386Impl.I:47:5: error: 'mov' was not declared in this scope
     mov edx, var_ptr;
     ^~~
C:/Temp/panda3d-master/dtool/src/dtoolbase/atomicAdjustI386Impl.I:48:5: error: 'lock' was not declared in this scope
     lock dec dword ptr [edx];
     ^~~~
C:/Temp/panda3d-master/dtool/src/dtoolbase/atomicAdjustI386Impl.I:48:5: note: suggested alternative: 'clock'
     lock dec dword ptr [edx];
     ^~~~
     clock
C:/Temp/panda3d-master/dtool/src/dtoolbase/atomicAdjustI386Impl.I:49:5: error: 'sete' was not declared in this scope
     sete c;
     ^~~~
C:/Temp/panda3d-master/dtool/src/dtoolbase/atomicAdjustI386Impl.I:49:5: note: suggested alternative: 'set'
     sete c;
     ^~~~
     set
C:/Temp/panda3d-master/dtool/src/dtoolbase/atomicAdjustI386Impl.I: In static member function 'static AtomicAdjustI386Impl::Integer AtomicAdjustI386Impl::compare_and_exchange(volatile Integer&, AtomicAdjustI386Impl::Integer, AtomicAdjustI386Impl::Integer)':
C:/Temp/panda3d-master/dtool/src/dtoolbase/atomicAdjustI386Impl.I:146:9: error: expected '(' before '{' token
   __asm {
         ^
         (
C:/Temp/panda3d-master/dtool/src/dtoolbase/atomicAdjustI386Impl.I:147:5: error: 'mov' was not declared in this scope
     mov edx, mem_ptr;
     ^~~
C:/Temp/panda3d-master/dtool/src/dtoolbase/atomicAdjustI386Impl.I:148:8: error: expected ';' before 'ecx'
     mov ecx, new_value;
        ^~~~
        ;
C:/Temp/panda3d-master/dtool/src/dtoolbase/atomicAdjustI386Impl.I:149:8: error: expected ';' before 'eax'
     mov eax, old_value;
        ^~~~
        ;
C:/Temp/panda3d-master/dtool/src/dtoolbase/atomicAdjustI386Impl.I:150:5: error: 'lock' was not declared in this scope
     lock cmpxchg dword ptr [edx], ecx;
     ^~~~
C:/Temp/panda3d-master/dtool/src/dtoolbase/atomicAdjustI386Impl.I:150:5: note: suggested alternative: 'clock'
     lock cmpxchg dword ptr [edx], ecx;
     ^~~~
     clock
C:/Temp/panda3d-master/dtool/src/dtoolbase/atomicAdjustI386Impl.I:151:8: error: expected ';' before 'prev'
     mov prev, eax;
        ^~~~~
        ;
C:/Temp/panda3d-master/dtool/src/dtoolbase/atomicAdjustI386Impl.I: In static member function 'static void* AtomicAdjustI386Impl::compare_and_exchange_ptr(void* volatile&, AtomicAdjustI386Impl::Pointer, AtomicAdjustI386Impl::Pointer)':
C:/Temp/panda3d-master/dtool/src/dtoolbase/atomicAdjustI386Impl.I:177:9: error: expected '(' before '{' token
   __asm {
         ^
         (
C:/Temp/panda3d-master/dtool/src/dtoolbase/atomicAdjustI386Impl.I:178:5: error: 'mov' was not declared in this scope
     mov edx, mem_ptr;
     ^~~
C:/Temp/panda3d-master/dtool/src/dtoolbase/atomicAdjustI386Impl.I:179:8: error: expected ';' before 'ecx'
     mov ecx, new_value;
        ^~~~
        ;
C:/Temp/panda3d-master/dtool/src/dtoolbase/atomicAdjustI386Impl.I:180:8: error: expected ';' before 'eax'
     mov eax, old_value;
        ^~~~
        ;
C:/Temp/panda3d-master/dtool/src/dtoolbase/atomicAdjustI386Impl.I:181:5: error: 'lock' was not declared in this scope
     lock cmpxchg dword ptr [edx], ecx;
     ^~~~
C:/Temp/panda3d-master/dtool/src/dtoolbase/atomicAdjustI386Impl.I:181:5: note: suggested alternative: 'clock'
     lock cmpxchg dword ptr [edx], ecx;
     ^~~~
     clock
C:/Temp/panda3d-master/dtool/src/dtoolbase/atomicAdjustI386Impl.I:182:8: error: expected ';' before 'prev'
     mov prev, eax;
        ^~~~~
        ;
In file included from C:/Qt5/Tools/mingw810_32/lib/gcc/i686-w64-mingw32/8.1.0/include/c++/i686-w64-mingw32/bits/gthr-default.h:35,
                 from C:/Qt5/Tools/mingw810_32/lib/gcc/i686-w64-mingw32/8.1.0/include/c++/i686-w64-mingw32/bits/gthr.h:148,
                 from C:/Qt5/Tools/mingw810_32/lib/gcc/i686-w64-mingw32/8.1.0/include/c++/ext/atomicity.h:35,
                 from C:/Qt5/Tools/mingw810_32/lib/gcc/i686-w64-mingw32/8.1.0/include/c++/bits/ios_base.h:39,
                 from C:/Qt5/Tools/mingw810_32/lib/gcc/i686-w64-mingw32/8.1.0/include/c++/ios:42,
                 from C:/Qt5/Tools/mingw810_32/lib/gcc/i686-w64-mingw32/8.1.0/include/c++/ostream:38,
                 from C:/Qt5/Tools/mingw810_32/lib/gcc/i686-w64-mingw32/8.1.0/include/c++/iostream:39,
                 from C:/Temp/panda3d-master/dtool/src/dtoolbase/dtoolbase_cc.h:62,
                 from C:/Temp/panda3d-master/dtool/src/dtoolbase/dtoolbase.h:506,
                 from C:/Temp/panda3d-master/dist/cmake/dtool/src/dtoolbase/checkPandaVersion.cxx:19,
                 from C:\Temp\panda3d-master\dist\cmake\dtool\src\dtoolbase\CMakeFiles\p3dtoolbase.dir\Unity\unity_0_cxx.cxx:3:
C:/Temp/panda3d-master/dtool/src/dtoolbase/mutexPosixImpl.h: In constructor 'constexpr MutexPosixImpl::MutexPosixImpl()':
C:/Temp/panda3d-master/dtool/src/dtoolbase/mutexPosixImpl.h:43:27: error: reinterpret_cast from integer to pointer
   pthread_mutex_t _lock = PTHREAD_MUTEX_INITIALIZER;
                           ^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from C:/Temp/panda3d-master/dtool/src/dtoolbase/cmath.h:77,
                 from C:/Temp/panda3d-master/dtool/src/dtoolbase/pdtoa.cxx:25,
                 from C:\Temp\panda3d-master\dist\cmake\dtool\src\dtoolbase\CMakeFiles\p3dtoolbase.dir\Unity\unity_0_cxx.cxx:18:
C:/Temp/panda3d-master/dtool/src/dtoolbase/cmath.I: In function 'void csincos(float, float*, float*)':
C:/Temp/panda3d-master/dtool/src/dtoolbase/cmath.I:59:9: error: expected '(' before '{' token
   __asm {
         ^
         (
C:/Temp/panda3d-master/dtool/src/dtoolbase/cmath.I:60:5: error: 'mov' was not declared in this scope
     mov eax, sin_result
     ^~~
C:/Temp/panda3d-master/dtool/src/dtoolbase/cmath.I:60:5: note: suggested alternative: 'cmod'
     mov eax, sin_result
     ^~~
     cmod
C:/Temp/panda3d-master/dtool/src/dtoolbase/cmath.I: In function 'void csincos(double, double*, double*)':
C:/Temp/panda3d-master/dtool/src/dtoolbase/cmath.I:226:9: error: expected '(' before '{' token
   __asm {
         ^
         (
C:/Temp/panda3d-master/dtool/src/dtoolbase/cmath.I:227:5: error: 'mov' was not declared in this scope
     mov eax, sin_result
     ^~~
C:/Temp/panda3d-master/dtool/src/dtoolbase/cmath.I:227:5: note: suggested alternative: 'cmod'
     mov eax, sin_result
     ^~~
     cmod
mingw32-make[2]: *** [cmake\dtool\src\dtoolbase\CMakeFiles\p3dtoolbase.dir\build.make:82: cmake/dtool/src/dtoolbase/CMakeFiles/p3dtoolbase.dir/Unity/unity_0_cxx.cxx.obj] Error 1
mingw32-make[1]: *** [CMakeFiles\Makefile2:3096: cmake/dtool/src/dtoolbase/CMakeFiles/p3dtoolbase.dir/all] Error 2
mingw32-make: *** [Makefile:159: all] Error 2

This is CMake log after configuration:

Using default build type Standard
The C compiler identification is GNU 8.1.0
The CXX compiler identification is GNU 8.1.0
Detecting C compiler ABI info
Detecting C compiler ABI info - done
Check for working C compiler: C:/Qt5/Tools/mingw810_32/bin/gcc.exe - skipped
Detecting C compile features
Detecting C compile features - done
Detecting CXX compiler ABI info
Detecting CXX compiler ABI info - done
Check for working CXX compiler: C:/Qt5/Tools/mingw810_32/bin/g++.exe - skipped
Detecting CXX compile features
Detecting CXX compile features - done
Performing Test COMPILER_SUPPORTS_FEXCEPTIONS
Performing Test COMPILER_SUPPORTS_FEXCEPTIONS - Success
Performing Test COMPILER_SUPPORTS_FRTTI
Performing Test COMPILER_SUPPORTS_FRTTI - Success
Performing Test COMPILER_SUPPORTS_FVISIBILITY_HIDDEN
Performing Test COMPILER_SUPPORTS_FVISIBILITY_HIDDEN - Success
CMake Warning (dev) at C:/Qt5/Tools/CMake_64/share/cmake-3.19/Modules/FindPackageHandleStandardArgs.cmake:426 (message):
  The package name passed to `find_package_handle_standard_args` (CgGL) does
  not match the name of the calling package (Cg).  This can lead to problems
  in calling code that expects `find_package` result variables (e.g.,
  `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  cmake/modules/FindCg.cmake:71 (find_package_handle_standard_args)
  cmake/modules/FindCg.cmake:165 (find_cggl)
  dtool/Package.cmake:653 (find_package)
  CMakeLists.txt:108 (include)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at C:/Qt5/Tools/CMake_64/share/cmake-3.19/Modules/FindPackageHandleStandardArgs.cmake:426 (message):
  The package name passed to `find_package_handle_standard_args` (CgD3D9)
  does not match the name of the calling package (Cg).  This can lead to
  problems in calling code that expects `find_package` result variables
  (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  cmake/modules/FindCg.cmake:116 (find_package_handle_standard_args)
  cmake/modules/FindCg.cmake:166 (find_cgd3d9)
  dtool/Package.cmake:653 (find_package)
  CMakeLists.txt:108 (include)
This warning is for project developers.  Use -Wno-dev to suppress it.

Looking for sys/types.h
Looking for sys/types.h - found
Looking for stdint.h
Looking for stdint.h - found
Looking for stddef.h
Looking for stddef.h - found
Check size of long
Check size of long - done
Check for STD namespace
Check for STD namespace - found
Check if the system is big endian
Searching 16 bit integer
Check size of unsigned short
Check size of unsigned short - done
Searching 16 bit integer - Using unsigned short
Check if the system is big endian - little endian
Performing Test PHAVE_LOCKF
Performing Test PHAVE_LOCKF - Failed
Performing Test SIMPLE_STRUCT_POINTERS
Performing Test SIMPLE_STRUCT_POINTERS - Failed
Looking for gettimeofday
Looking for gettimeofday - found
Performing Test GETTIMEOFDAY_ONE_PARAM
Performing Test GETTIMEOFDAY_ONE_PARAM - Failed
Looking for getopt
Looking for getopt - found
Looking for getopt_long_only
Looking for getopt_long_only - found
Looking for C++ include getopt.h
Looking for C++ include getopt.h - found
Performing Test HAVE_IOS_TYPEDEFS
Performing Test HAVE_IOS_TYPEDEFS - Success
Performing Test HAVE_IOS_BINARY
Performing Test HAVE_IOS_BINARY - Success
Looking for C++ include io.h
Looking for C++ include io.h - found
Looking for C++ include iostream
Looking for C++ include iostream - found
Looking for C++ include malloc.h
Looking for C++ include malloc.h - found
Looking for C++ include sys/malloc.h
Looking for C++ include sys/malloc.h - not found
Looking for C++ include alloca.h
Looking for C++ include alloca.h - not found
Looking for C++ include locale.h
Looking for C++ include locale.h - found
Looking for C++ include string.h
Looking for C++ include string.h - found
Looking for C++ include stdlib.h
Looking for C++ include stdlib.h - found
Looking for C++ include limits.h
Looking for C++ include limits.h - found
Looking for C++ include sstream
Looking for C++ include sstream - found
Looking for C++ include new
Looking for C++ include new - found
Looking for C++ include sys/types.h
Looking for C++ include sys/types.h - found
Looking for C++ include sys/time.h
Looking for C++ include sys/time.h - found
Looking for C++ include unistd.h
Looking for C++ include unistd.h - found
Looking for C++ include utime.h
Looking for C++ include utime.h - found
Looking for C++ include glob.h
Looking for C++ include glob.h - not found
Looking for C++ include dirent.h
Looking for C++ include dirent.h - found
Looking for C++ include ucontext.h
Looking for C++ include ucontext.h - not found
Looking for C++ include linux/input.h
Looking for C++ include linux/input.h - not found
Looking for C++ include stdint.h
Looking for C++ include stdint.h - found
Performing Test HAVE_SSE2
Performing Test HAVE_SSE2 - Success

Configuring support for the following optional third-party packages:
+ OpenSSL
+ zlib
+ libjpeg
+ libpng
+ libtiff
+ OpenEXR
+ libsquish
+ Assimp
+ FCollada
- Eigen linear algebra library (not found)
- FFTW (not found)
+ FFmpeg (with swscale and swresample)
+ Vorbis
+ Opus
+ FMOD Ex sound library
+ OpenAL sound library
+ FreeType
+ HarfBuzz
- gtk+-2 (not found)
+ Bullet physics
+ Open Dynamics Engine
- SpeedTree (not found)
+ OpenGL
- OpenGL ES 1.x (not found)
- OpenGL ES 2.x (not found)
- Direct3D 9.x (not found)
+ Nvidia Cg Shading Language (supporting OpenGL and Direct3D 9)
- X11 (not found)
- EGL (not found)
- OpenCV (not found)
+ ARToolKit
+ VRPN

Compilation will generate Python interfaces for Python 3.9.6.
Compilation will include full, pipelined threading support.

See dtool_config.h for more details about the specified configuration.

Configuring done

I use MinGW 32-bit and panda3d-1.10.10-tools-win32:

image

I tried to default settings in CMake GUI. Maybe can I try to change anything in this settings?


















The problem is not the settings, but that the MinGW compiler does not like the syntax of the code. This can be understood by mistakes.

No one said it would be easy.

Let’s try to find solutions together in the Internet. There is some people who have compiled it successfully. I will try to compile it from time to time. Try to build on your machines by yourself. Maybe developers of Panda will suggest some recommendations or will change something on Github repo.

Yes, it arises from different standards, compilers adhere to certain standards.

The fix is to bring the code under the MinGW compiler standard . It’s just a routine job of rewriting the code.

There is this branch, I don’t know how it will be useful in this matter. You can study it.

I tried to build Panda3D 64-bit with MinGW 64-bit and panda3d-1.10.10-tools-win64. I used current panda3d-master as before. This is my result. I have another errors:

Text version:

C:\Temp\panda3d-master\dist>mingw32-make
Scanning dependencies of target p3dtoolbase
[  0%] Building CXX object cmake/dtool/src/dtoolbase/CMakeFiles/p3dtoolbase.dir/Unity/unity_0_cxx.cxx.obj
In file included from C:/Qt6/Tools/mingw810_64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/x86_64-w64-mingw32/bits/gthr-default.h:35,
                 from C:/Qt6/Tools/mingw810_64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/x86_64-w64-mingw32/bits/gthr.h:148,
                 from C:/Qt6/Tools/mingw810_64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/ext/atomicity.h:35,
                 from C:/Qt6/Tools/mingw810_64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/bits/ios_base.h:39,
                 from C:/Qt6/Tools/mingw810_64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/ios:42,
                 from C:/Qt6/Tools/mingw810_64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/ostream:38,
                 from C:/Qt6/Tools/mingw810_64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/iostream:39,
                 from C:/Temp/panda3d-master/dtool/src/dtoolbase/dtoolbase_cc.h:62,
                 from C:/Temp/panda3d-master/dtool/src/dtoolbase/dtoolbase.h:506,
                 from C:/Temp/panda3d-master/dist/cmake/dtool/src/dtoolbase/checkPandaVersion.cxx:19,
                 from C:\Temp\panda3d-master\dist\cmake\dtool\src\dtoolbase\CMakeFiles\p3dtoolbase.dir\Unity\unity_0_cxx.cxx:3:
C:/Temp/panda3d-master/dtool/src/dtoolbase/mutexPosixImpl.h: In constructor 'constexpr MutexPosixImpl::MutexPosixImpl()':
C:/Temp/panda3d-master/dtool/src/dtoolbase/mutexPosixImpl.h:43:27: error: reinterpret_cast from integer to pointer
   pthread_mutex_t _lock = PTHREAD_MUTEX_INITIALIZER;
                           ^~~~~~~~~~~~~~~~~~~~~~~~~
mingw32-make[2]: *** [cmake\dtool\src\dtoolbase\CMakeFiles\p3dtoolbase.dir\build.make:82: cmake/dtool/src/dtoolbase/CMakeFiles/p3dtoolbase.dir/Unity/unity_0_cxx.cxx.obj] Error 1
mingw32-make[1]: *** [CMakeFiles\Makefile2:3096: cmake/dtool/src/dtoolbase/CMakeFiles/p3dtoolbase.dir/all] Error 2
mingw32-make: *** [Makefile:159: all] Error 2

Before of it I set MinGW from Qt 6.2.0 in “Edit environment variable” in PATH:

image

image

Configuration log from “CMake GUI”:

Using default build type Standard
The C compiler identification is GNU 8.1.0
The CXX compiler identification is GNU 8.1.0
Detecting C compiler ABI info
Detecting C compiler ABI info - done
Check for working C compiler: C:/Qt6/Tools/mingw810_64/bin/gcc.exe - skipped
Detecting C compile features
Detecting C compile features - done
Detecting CXX compiler ABI info
Detecting CXX compiler ABI info - done
Check for working CXX compiler: C:/Qt6/Tools/mingw810_64/bin/g++.exe - skipped
Detecting CXX compile features
Detecting CXX compile features - done
Performing Test COMPILER_SUPPORTS_FEXCEPTIONS
Performing Test COMPILER_SUPPORTS_FEXCEPTIONS - Success
Performing Test COMPILER_SUPPORTS_FRTTI
Performing Test COMPILER_SUPPORTS_FRTTI - Success
Performing Test COMPILER_SUPPORTS_FVISIBILITY_HIDDEN
Performing Test COMPILER_SUPPORTS_FVISIBILITY_HIDDEN - Success
CMake Warning (dev) at C:/Qt5/Tools/CMake_64/share/cmake-3.19/Modules/FindPackageHandleStandardArgs.cmake:426 (message):
  The package name passed to `find_package_handle_standard_args` (CgGL) does
  not match the name of the calling package (Cg).  This can lead to problems
  in calling code that expects `find_package` result variables (e.g.,
  `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  cmake/modules/FindCg.cmake:71 (find_package_handle_standard_args)
  cmake/modules/FindCg.cmake:165 (find_cggl)
  dtool/Package.cmake:653 (find_package)
  CMakeLists.txt:108 (include)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at C:/Qt5/Tools/CMake_64/share/cmake-3.19/Modules/FindPackageHandleStandardArgs.cmake:426 (message):
  The package name passed to `find_package_handle_standard_args` (CgD3D9)
  does not match the name of the calling package (Cg).  This can lead to
  problems in calling code that expects `find_package` result variables
  (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  cmake/modules/FindCg.cmake:116 (find_package_handle_standard_args)
  cmake/modules/FindCg.cmake:166 (find_cgd3d9)
  dtool/Package.cmake:653 (find_package)
  CMakeLists.txt:108 (include)
This warning is for project developers.  Use -Wno-dev to suppress it.

Looking for sys/types.h
Looking for sys/types.h - found
Looking for stdint.h
Looking for stdint.h - found
Looking for stddef.h
Looking for stddef.h - found
Check size of long
Check size of long - done
Check for STD namespace
Check for STD namespace - found
Check if the system is big endian
Searching 16 bit integer
Check size of unsigned short
Check size of unsigned short - done
Searching 16 bit integer - Using unsigned short
Check if the system is big endian - little endian
Performing Test PHAVE_LOCKF
Performing Test PHAVE_LOCKF - Failed
Performing Test SIMPLE_STRUCT_POINTERS
Performing Test SIMPLE_STRUCT_POINTERS - Failed
Looking for gettimeofday
Looking for gettimeofday - found
Performing Test GETTIMEOFDAY_ONE_PARAM
Performing Test GETTIMEOFDAY_ONE_PARAM - Failed
Looking for getopt
Looking for getopt - found
Looking for getopt_long_only
Looking for getopt_long_only - found
Looking for C++ include getopt.h
Looking for C++ include getopt.h - found
Performing Test HAVE_IOS_TYPEDEFS
Performing Test HAVE_IOS_TYPEDEFS - Success
Performing Test HAVE_IOS_BINARY
Performing Test HAVE_IOS_BINARY - Success
Looking for C++ include io.h
Looking for C++ include io.h - found
Looking for C++ include iostream
Looking for C++ include iostream - found
Looking for C++ include malloc.h
Looking for C++ include malloc.h - found
Looking for C++ include sys/malloc.h
Looking for C++ include sys/malloc.h - not found
Looking for C++ include alloca.h
Looking for C++ include alloca.h - not found
Looking for C++ include locale.h
Looking for C++ include locale.h - found
Looking for C++ include string.h
Looking for C++ include string.h - found
Looking for C++ include stdlib.h
Looking for C++ include stdlib.h - found
Looking for C++ include limits.h
Looking for C++ include limits.h - found
Looking for C++ include sstream
Looking for C++ include sstream - found
Looking for C++ include new
Looking for C++ include new - found
Looking for C++ include sys/types.h
Looking for C++ include sys/types.h - found
Looking for C++ include sys/time.h
Looking for C++ include sys/time.h - found
Looking for C++ include unistd.h
Looking for C++ include unistd.h - found
Looking for C++ include utime.h
Looking for C++ include utime.h - found
Looking for C++ include glob.h
Looking for C++ include glob.h - not found
Looking for C++ include dirent.h
Looking for C++ include dirent.h - found
Looking for C++ include ucontext.h
Looking for C++ include ucontext.h - not found
Looking for C++ include linux/input.h
Looking for C++ include linux/input.h - not found
Looking for C++ include stdint.h
Looking for C++ include stdint.h - found
Performing Test HAVE_SSE2
Performing Test HAVE_SSE2 - Success

Configuring support for the following optional third-party packages:
+ OpenSSL
+ zlib
+ libjpeg
+ libpng
+ libtiff
+ OpenEXR
+ libsquish
+ Assimp
+ FCollada
+ Eigen linear algebra library (vectorization enabled in build)
- FFTW (not found)
+ FFmpeg (with swscale and swresample)
+ Vorbis
+ Opus
+ FMOD Ex sound library
+ OpenAL sound library
+ FreeType
+ HarfBuzz
- gtk+-2 (not found)
+ Bullet physics
+ Open Dynamics Engine
- SpeedTree (not found)
+ OpenGL
- OpenGL ES 1.x (not found)
- OpenGL ES 2.x (not found)
- Direct3D 9.x (not found)
+ Nvidia Cg Shading Language (supporting OpenGL and Direct3D 9)
- X11 (not found)
- EGL (not found)
- OpenCV (not found)
+ ARToolKit
+ VRPN

Compilation will generate Python interfaces for Python 3.9.6.
Compilation will include full, pipelined threading support.

See dtool_config.h for more details about the specified configuration.

Configuring done

It’s a little bit unusual that you’re building for 32-bit, so I think that combination just hasn’t been tested. It was tripping up over the i386 assembly code we have in there.

The pthread issue is odd, the code is in fact valid, but you could try changing that line of code to:
pthread_mutex_t _lock = (pthread_mutex_t)PTHREAD_MUTEX_INITIALIZER;

1 Like

This did not help:

C:\Temp\panda3d-master\dist>mingw32-make
Scanning dependencies of target p3dtoolbase
[  0%] Building CXX object cmake/dtool/src/dtoolbase/CMakeFiles/p3dtoolbase.dir/Unity/unity_0_cxx.cxx.obj
In file included from C:/Qt6/Tools/mingw810_64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/x86_64-w64-mingw32/bits/gthr-default.h:35,
                 from C:/Qt6/Tools/mingw810_64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/x86_64-w64-mingw32/bits/gthr.h:148,
                 from C:/Qt6/Tools/mingw810_64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/ext/atomicity.h:35,
                 from C:/Qt6/Tools/mingw810_64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/bits/ios_base.h:39,
                 from C:/Qt6/Tools/mingw810_64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/ios:42,
                 from C:/Qt6/Tools/mingw810_64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/ostream:38,
                 from C:/Qt6/Tools/mingw810_64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/iostream:39,
                 from C:/Temp/panda3d-master/dtool/src/dtoolbase/dtoolbase_cc.h:62,
                 from C:/Temp/panda3d-master/dtool/src/dtoolbase/dtoolbase.h:506,
                 from C:/Temp/panda3d-master/dist/cmake/dtool/src/dtoolbase/checkPandaVersion.cxx:19,
                 from C:\Temp\panda3d-master\dist\cmake\dtool\src\dtoolbase\CMakeFiles\p3dtoolbase.dir\Unity\unity_0_cxx.cxx:3:
C:/Temp/panda3d-master/dtool/src/dtoolbase/mutexPosixImpl.h: In constructor 'constexpr MutexPosixImpl::MutexPosixImpl()':
C:/Temp/panda3d-master/dtool/src/dtoolbase/mutexPosixImpl.h:43:44: error: reinterpret_cast from integer to pointer
   pthread_mutex_t _lock = (pthread_mutex_t)PTHREAD_MUTEX_INITIALIZER;
                                            ^~~~~~~~~~~~~~~~~~~~~~~~~
mingw32-make[2]: *** [cmake\dtool\src\dtoolbase\CMakeFiles\p3dtoolbase.dir\build.make:82: cmake/dtool/src/dtoolbase/CMakeFiles/p3dtoolbase.dir/Unity/unity_0_cxx.cxx.obj] Error 1
mingw32-make[1]: *** [CMakeFiles\Makefile2:3096: cmake/dtool/src/dtoolbase/CMakeFiles/p3dtoolbase.dir/all] Error 2
mingw32-make: *** [Makefile:159: all] Error 2

Maybe this?

pthread_mutex_t _lock = nullptr;
1 Like

Yes, it works. Next errors:

image

image

image

image

image

C:\Temp\panda3d-master\dist>mingw32-make
Scanning dependencies of target p3dtoolbase
[  0%] Building CXX object cmake/dtool/src/dtoolbase/CMakeFiles/p3dtoolbase.dir/Unity/unity_0_cxx.cxx.obj
[  0%] Building CXX object cmake/dtool/src/dtoolbase/CMakeFiles/p3dtoolbase.dir/indent.cxx.obj
[  0%] Building C object cmake/dtool/src/dtoolbase/CMakeFiles/p3dtoolbase.dir/lookup3.c.obj
cc1.exe: warning: command line option '-fno-rtti' is valid for C++/ObjC++ but not for C
[  0%] Built target p3dtoolbase
Scanning dependencies of target p3dtoolutil
[  1%] Building CXX object cmake/dtool/src/dtoolutil/CMakeFiles/p3dtoolutil.dir/Unity/unity_0_cxx.cxx.obj
In file included from C:\Temp\panda3d-master\dist\cmake\dtool\src\dtoolutil\CMakeFiles\p3dtoolutil.dir\Unity\unity_0_cxx.cxx:6:
C:/Temp/panda3d-master/dtool/src/dtoolutil/filename.cxx: In member function 'bool Filename::exists() const':
C:/Temp/panda3d-master/dtool/src/dtoolutil/filename.cxx:1276:15: warning: comparison of integer expressions of different signedness: 'DWORD' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
   if (results != -1) {
       ~~~~~~~~^~~~~
C:/Temp/panda3d-master/dtool/src/dtoolutil/filename.cxx: In member function 'bool Filename::is_regular_file() const':
C:/Temp/panda3d-master/dtool/src/dtoolutil/filename.cxx:1306:15: warning: comparison of integer expressions of different signedness: 'DWORD' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
   if (results != -1) {
       ~~~~~~~~^~~~~
C:/Temp/panda3d-master/dtool/src/dtoolutil/filename.cxx: In member function 'bool Filename::is_writable() const':
C:/Temp/panda3d-master/dtool/src/dtoolutil/filename.cxx:1336:15: warning: comparison of integer expressions of different signedness: 'DWORD' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
   if (results != -1) {
       ~~~~~~~~^~~~~
C:/Temp/panda3d-master/dtool/src/dtoolutil/filename.cxx: In member function 'bool Filename::is_directory() const':
C:/Temp/panda3d-master/dtool/src/dtoolutil/filename.cxx:1368:15: warning: comparison of integer expressions of different signedness: 'DWORD' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
   if (results != -1) {
       ~~~~~~~~^~~~~
C:/Temp/panda3d-master/dtool/src/dtoolutil/filename.cxx: In member function 'bool Filename::open_read(std::ifstream&) const':
C:/Temp/panda3d-master/dtool/src/dtoolutil/filename.cxx:1881:45: error: no matching function for call to 'std::basic_ifstream<char>::open(const wchar_t*, ios_openmode&)'
   stream.open(os_specific.c_str(), open_mode);
                                             ^
In file included from C:/Temp/panda3d-master/dtool/src/dtoolbase/dtoolbase_cc.h:63,
                 from C:/Temp/panda3d-master/dtool/src/dtoolbase/dtoolbase.h:506,
                 from C:/Temp/panda3d-master/dtool/src/dtoolutil/config_dtoolutil.h:17,
                 from C:/Temp/panda3d-master/dtool/src/dtoolutil/config_dtoolutil.cxx:14,
                 from C:\Temp\panda3d-master\dist\cmake\dtool\src\dtoolutil\CMakeFiles\p3dtoolutil.dir\Unity\unity_0_cxx.cxx:3:
C:/Qt6/Tools/mingw810_64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/fstream:625:7: note: candidate: 'void std::basic_ifstream<_CharT, _Traits>::open(const char*, std::ios_base::openmode) [with _CharT = char; _Traits = std::char_traits<char>; std::ios_base::openmode = std::_Ios_Openmode]'
       open(const char* __s, ios_base::openmode __mode = ios_base::in)
       ^~~~
C:/Qt6/Tools/mingw810_64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/fstream:625:7: note:   no known conversion for argument 1 from 'const wchar_t*' to 'const char*'
C:/Qt6/Tools/mingw810_64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/fstream:645:7: note: candidate: 'void std::basic_ifstream<_CharT, _Traits>::open(const string&, std::ios_base::openmode) [with _CharT = char; _Traits = std::char_traits<char>; std::__cxx11::string = std::__cxx11::basic_string<char>; std::ios_base::openmode = std::_Ios_Openmode]'
       open(const std::string& __s, ios_base::openmode __mode = ios_base::in)
       ^~~~
C:/Qt6/Tools/mingw810_64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/fstream:645:7: note:   no known conversion for argument 1 from 'const wchar_t*' to 'const string&' {aka 'const std::__cxx11::basic_string<char>&'}
In file included from C:\Temp\panda3d-master\dist\cmake\dtool\src\dtoolutil\CMakeFiles\p3dtoolutil.dir\Unity\unity_0_cxx.cxx:6:
C:/Temp/panda3d-master/dtool/src/dtoolutil/filename.cxx: In member function 'bool Filename::open_write(std::ofstream&, bool) const':
C:/Temp/panda3d-master/dtool/src/dtoolutil/filename.cxx:1934:45: error: no matching function for call to 'std::basic_ofstream<char>::open(const wchar_t*, ios_openmode&)'
   stream.open(os_specific.c_str(), open_mode);
                                             ^
In file included from C:/Temp/panda3d-master/dtool/src/dtoolbase/dtoolbase_cc.h:63,
                 from C:/Temp/panda3d-master/dtool/src/dtoolbase/dtoolbase.h:506,
                 from C:/Temp/panda3d-master/dtool/src/dtoolutil/config_dtoolutil.h:17,
                 from C:/Temp/panda3d-master/dtool/src/dtoolutil/config_dtoolutil.cxx:14,
                 from C:\Temp\panda3d-master\dist\cmake\dtool\src\dtoolutil\CMakeFiles\p3dtoolutil.dir\Unity\unity_0_cxx.cxx:3:
C:/Qt6/Tools/mingw810_64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/fstream:851:7: note: candidate: 'void std::basic_ofstream<_CharT, _Traits>::open(const char*, std::ios_base::openmode) [with _CharT = char; _Traits = std::char_traits<char>; std::ios_base::openmode = std::_Ios_Openmode]'
       open(const char* __s, ios_base::openmode __mode = ios_base::out)
       ^~~~
C:/Qt6/Tools/mingw810_64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/fstream:851:7: note:   no known conversion for argument 1 from 'const wchar_t*' to 'const char*'
C:/Qt6/Tools/mingw810_64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/fstream:871:7: note: candidate: 'void std::basic_ofstream<_CharT, _Traits>::open(const string&, std::ios_base::openmode) [with _CharT = char; _Traits = std::char_traits<char>; std::__cxx11::string = std::__cxx11::basic_string<char>; std::ios_base::openmode = std::_Ios_Openmode]'
       open(const std::string& __s, ios_base::openmode __mode = ios_base::out)
       ^~~~
C:/Qt6/Tools/mingw810_64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/fstream:871:7: note:   no known conversion for argument 1 from 'const wchar_t*' to 'const string&' {aka 'const std::__cxx11::basic_string<char>&'}
In file included from C:\Temp\panda3d-master\dist\cmake\dtool\src\dtoolutil\CMakeFiles\p3dtoolutil.dir\Unity\unity_0_cxx.cxx:6:
C:/Temp/panda3d-master/dtool/src/dtoolutil/filename.cxx: In member function 'bool Filename::open_append(std::ofstream&) const':
C:/Temp/panda3d-master/dtool/src/dtoolutil/filename.cxx:1966:45: error: no matching function for call to 'std::basic_ofstream<char>::open(const wchar_t*, ios_openmode&)'
   stream.open(os_specific.c_str(), open_mode);
                                             ^
In file included from C:/Temp/panda3d-master/dtool/src/dtoolbase/dtoolbase_cc.h:63,
                 from C:/Temp/panda3d-master/dtool/src/dtoolbase/dtoolbase.h:506,
                 from C:/Temp/panda3d-master/dtool/src/dtoolutil/config_dtoolutil.h:17,
                 from C:/Temp/panda3d-master/dtool/src/dtoolutil/config_dtoolutil.cxx:14,
                 from C:\Temp\panda3d-master\dist\cmake\dtool\src\dtoolutil\CMakeFiles\p3dtoolutil.dir\Unity\unity_0_cxx.cxx:3:
C:/Qt6/Tools/mingw810_64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/fstream:851:7: note: candidate: 'void std::basic_ofstream<_CharT, _Traits>::open(const char*, std::ios_base::openmode) [with _CharT = char; _Traits = std::char_traits<char>; std::ios_base::openmode = std::_Ios_Openmode]'
       open(const char* __s, ios_base::openmode __mode = ios_base::out)
       ^~~~
C:/Qt6/Tools/mingw810_64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/fstream:851:7: note:   no known conversion for argument 1 from 'const wchar_t*' to 'const char*'
C:/Qt6/Tools/mingw810_64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/fstream:871:7: note: candidate: 'void std::basic_ofstream<_CharT, _Traits>::open(const string&, std::ios_base::openmode) [with _CharT = char; _Traits = std::char_traits<char>; std::__cxx11::string = std::__cxx11::basic_string<char>; std::ios_base::openmode = std::_Ios_Openmode]'
       open(const std::string& __s, ios_base::openmode __mode = ios_base::out)
       ^~~~
C:/Qt6/Tools/mingw810_64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/fstream:871:7: note:   no known conversion for argument 1 from 'const wchar_t*' to 'const string&' {aka 'const std::__cxx11::basic_string<char>&'}
In file included from C:\Temp\panda3d-master\dist\cmake\dtool\src\dtoolutil\CMakeFiles\p3dtoolutil.dir\Unity\unity_0_cxx.cxx:6:
C:/Temp/panda3d-master/dtool/src/dtoolutil/filename.cxx: In member function 'bool Filename::open_read_write(std::fstream&, bool) const':
C:/Temp/panda3d-master/dtool/src/dtoolutil/filename.cxx:2008:45: error: no matching function for call to 'std::basic_fstream<char>::open(const wchar_t*, ios_openmode&)'
   stream.open(os_specific.c_str(), open_mode);
                                             ^
In file included from C:/Temp/panda3d-master/dtool/src/dtoolbase/dtoolbase_cc.h:63,
                 from C:/Temp/panda3d-master/dtool/src/dtoolbase/dtoolbase.h:506,
                 from C:/Temp/panda3d-master/dtool/src/dtoolutil/config_dtoolutil.h:17,
                 from C:/Temp/panda3d-master/dtool/src/dtoolutil/config_dtoolutil.cxx:14,
                 from C:\Temp\panda3d-master\dist\cmake\dtool\src\dtoolutil\CMakeFiles\p3dtoolutil.dir\Unity\unity_0_cxx.cxx:3:
C:/Qt6/Tools/mingw810_64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/fstream:1073:7: note: candidate: 'void std::basic_fstream<_CharT, _Traits>::open(const char*, std::ios_base::openmode) [with _CharT = char; _Traits = std::char_traits<char>; std::ios_base::openmode = std::_Ios_Openmode]'
       open(const char* __s,
       ^~~~
C:/Qt6/Tools/mingw810_64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/fstream:1073:7: note:   no known conversion for argument 1 from 'const wchar_t*' to 'const char*'
C:/Qt6/Tools/mingw810_64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/fstream:1094:7: note: candidate: 'void std::basic_fstream<_CharT, _Traits>::open(const string&, std::ios_base::openmode) [with _CharT = char; _Traits = std::char_traits<char>; std::__cxx11::string = std::__cxx11::basic_string<char>; std::ios_base::openmode = std::_Ios_Openmode]'
       open(const std::string& __s,
       ^~~~
C:/Qt6/Tools/mingw810_64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/fstream:1094:7: note:   no known conversion for argument 1 from 'const wchar_t*' to 'const string&' {aka 'const std::__cxx11::basic_string<char>&'}
In file included from C:\Temp\panda3d-master\dist\cmake\dtool\src\dtoolutil\CMakeFiles\p3dtoolutil.dir\Unity\unity_0_cxx.cxx:6:
C:/Temp/panda3d-master/dtool/src/dtoolutil/filename.cxx: In member function 'bool Filename::open_read_append(std::fstream&) const':
C:/Temp/panda3d-master/dtool/src/dtoolutil/filename.cxx:2040:45: error: no matching function for call to 'std::basic_fstream<char>::open(const wchar_t*, ios_openmode&)'
   stream.open(os_specific.c_str(), open_mode);
                                             ^
In file included from C:/Temp/panda3d-master/dtool/src/dtoolbase/dtoolbase_cc.h:63,
                 from C:/Temp/panda3d-master/dtool/src/dtoolbase/dtoolbase.h:506,
                 from C:/Temp/panda3d-master/dtool/src/dtoolutil/config_dtoolutil.h:17,
                 from C:/Temp/panda3d-master/dtool/src/dtoolutil/config_dtoolutil.cxx:14,
                 from C:\Temp\panda3d-master\dist\cmake\dtool\src\dtoolutil\CMakeFiles\p3dtoolutil.dir\Unity\unity_0_cxx.cxx:3:
C:/Qt6/Tools/mingw810_64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/fstream:1073:7: note: candidate: 'void std::basic_fstream<_CharT, _Traits>::open(const char*, std::ios_base::openmode) [with _CharT = char; _Traits = std::char_traits<char>; std::ios_base::openmode = std::_Ios_Openmode]'
       open(const char* __s,
       ^~~~
C:/Qt6/Tools/mingw810_64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/fstream:1073:7: note:   no known conversion for argument 1 from 'const wchar_t*' to 'const char*'
C:/Qt6/Tools/mingw810_64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/fstream:1094:7: note: candidate: 'void std::basic_fstream<_CharT, _Traits>::open(const string&, std::ios_base::openmode) [with _CharT = char; _Traits = std::char_traits<char>; std::__cxx11::string = std::__cxx11::basic_string<char>; std::ios_base::openmode = std::_Ios_Openmode]'
       open(const std::string& __s,
       ^~~~
C:/Qt6/Tools/mingw810_64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/fstream:1094:7: note:   no known conversion for argument 1 from 'const wchar_t*' to 'const string&' {aka 'const std::__cxx11::basic_string<char>&'}
In file included from C:\Temp\panda3d-master\dist\cmake\dtool\src\dtoolutil\CMakeFiles\p3dtoolutil.dir\Unity\unity_0_cxx.cxx:27:
C:/Temp/panda3d-master/dtool/src/dtoolutil/win32ArgParser.cxx: In static member function 'static bool Win32ArgParser::do_glob()':
C:/Temp/panda3d-master/dtool/src/dtoolutil/win32ArgParser.cxx:188:17: warning: comparison of integer expressions of different signedness: 'DWORD' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
   if (parent_id != -1) {
       ~~~~~~~~~~^~~~~
mingw32-make[2]: *** [cmake\dtool\src\dtoolutil\CMakeFiles\p3dtoolutil.dir\build.make:82: cmake/dtool/src/dtoolutil/CMakeFiles/p3dtoolutil.dir/Unity/unity_0_cxx.cxx.obj] Error 1
mingw32-make[1]: *** [CMakeFiles\Makefile2:3123: cmake/dtool/src/dtoolutil/CMakeFiles/p3dtoolutil.dir/all] Error 2
mingw32-make: *** [Makefile:159: all] Error 2

Well, you see the code around it:

#ifdef _WIN32
  wstring os_specific = to_os_specific_w();
  stream.open(os_specific.c_str(), open_mode);
#else
  string os_specific = to_os_specific();
  stream.open(os_specific.c_str(), open_mode);
#endif  // _WIN32

It’s always picking a wchar_t in the case of Windows, even when not using the MSVC compiler. I think that instead of testing for _WIN32 it needs to be checking for _MSC_VER, so that it picks the second case for MinGW.

1 Like

These errors were solved. Another ones:

C:\Temp\panda3d-master\dist>mingw32-make
[  0%] Built target p3dtoolbase
Scanning dependencies of target p3dtoolutil
[  1%] Building CXX object cmake/dtool/src/dtoolutil/CMakeFiles/p3dtoolutil.dir/Unity/unity_0_cxx.cxx.obj
In file included from C:\Temp\panda3d-master\dist\cmake\dtool\src\dtoolutil\CMakeFiles\p3dtoolutil.dir\Unity\unity_0_cxx.cxx:6:
C:/Temp/panda3d-master/dtool/src/dtoolutil/filename.cxx: In member function 'bool Filename::make_canonical()':
C:/Temp/panda3d-master/dtool/src/dtoolutil/filename.cxx:1027:7: error: 'realpath' was not declared in this scope
   if (realpath(c_str(), newpath) != nullptr) {
       ^~~~~~~~
C:/Temp/panda3d-master/dtool/src/dtoolutil/filename.cxx:1027:7: note: suggested alternative: 'newpath'
   if (realpath(c_str(), newpath) != nullptr) {
       ^~~~~~~~
       newpath
C:/Temp/panda3d-master/dtool/src/dtoolutil/filename.cxx: In member function 'bool Filename::make_dir() const':
C:/Temp/panda3d-master/dtool/src/dtoolutil/filename.cxx:2517:38: error: too many arguments to function 'int mkdir(const char*)'
     ::mkdir(os_specific.c_str(), 0777);
                                      ^
In file included from C:/Temp/panda3d-master/dtool/src/dtoolutil/executionEnvironment.cxx:30,
                 from C:\Temp\panda3d-master\dist\cmake\dtool\src\dtoolutil\CMakeFiles\p3dtoolutil.dir\Unity\unity_0_cxx.cxx:5:
C:/Qt6/Tools/mingw810_64/x86_64-w64-mingw32/include/direct.h:59:15: note: declared here
   int __cdecl mkdir(const char *_Path) __MINGW_ATTRIB_DEPRECATED_MSVC2005;
               ^~~~~
In file included from C:\Temp\panda3d-master\dist\cmake\dtool\src\dtoolutil\CMakeFiles\p3dtoolutil.dir\Unity\unity_0_cxx.cxx:6:
C:/Temp/panda3d-master/dtool/src/dtoolutil/filename.cxx:2529:49: error: too many arguments to function 'int mkdir(const char*)'
   int result = ::mkdir(os_specific.c_str(), 0777);
                                                 ^
In file included from C:/Temp/panda3d-master/dtool/src/dtoolutil/executionEnvironment.cxx:30,
                 from C:\Temp\panda3d-master\dist\cmake\dtool\src\dtoolutil\CMakeFiles\p3dtoolutil.dir\Unity\unity_0_cxx.cxx:5:
C:/Qt6/Tools/mingw810_64/x86_64-w64-mingw32/include/direct.h:59:15: note: declared here
   int __cdecl mkdir(const char *_Path) __MINGW_ATTRIB_DEPRECATED_MSVC2005;
               ^~~~~
In file included from C:\Temp\panda3d-master\dist\cmake\dtool\src\dtoolutil\CMakeFiles\p3dtoolutil.dir\Unity\unity_0_cxx.cxx:6:
C:/Temp/panda3d-master/dtool/src/dtoolutil/filename.cxx: In member function 'bool Filename::mkdir() const':
C:/Temp/panda3d-master/dtool/src/dtoolutil/filename.cxx:2548:49: error: too many arguments to function 'int mkdir(const char*)'
   int result = ::mkdir(os_specific.c_str(), 0777);
                                                 ^
In file included from C:/Temp/panda3d-master/dtool/src/dtoolutil/executionEnvironment.cxx:30,
                 from C:\Temp\panda3d-master\dist\cmake\dtool\src\dtoolutil\CMakeFiles\p3dtoolutil.dir\Unity\unity_0_cxx.cxx:5:
C:/Qt6/Tools/mingw810_64/x86_64-w64-mingw32/include/direct.h:59:15: note: declared here
   int __cdecl mkdir(const char *_Path) __MINGW_ATTRIB_DEPRECATED_MSVC2005;
               ^~~~~
In file included from C:\Temp\panda3d-master\dist\cmake\dtool\src\dtoolutil\CMakeFiles\p3dtoolutil.dir\Unity\unity_0_cxx.cxx:6:
C:/Temp/panda3d-master/dtool/src/dtoolutil/filename.cxx: In member function 'bool Filename::atomic_compare_and_exchange_contents(std::__cxx11::string&, const string&, const string&) const':
C:/Temp/panda3d-master/dtool/src/dtoolutil/filename.cxx:2729:17: error: 'LOCK_EX' was not declared in this scope
   if (flock(fd, LOCK_EX) != 0) {
                 ^~~~~~~
C:/Temp/panda3d-master/dtool/src/dtoolutil/filename.cxx:2729:17: note: suggested alternative: 'LOCKTYPE'
   if (flock(fd, LOCK_EX) != 0) {
                 ^~~~~~~
                 LOCKTYPE
C:/Temp/panda3d-master/dtool/src/dtoolutil/filename.cxx:2729:7: error: 'flock' was not declared in this scope
   if (flock(fd, LOCK_EX) != 0) {
       ^~~~~
C:/Temp/panda3d-master/dtool/src/dtoolutil/filename.cxx:2729:7: note: suggested alternative: 'clock'
   if (flock(fd, LOCK_EX) != 0) {
       ^~~~~
       clock
C:/Temp/panda3d-master/dtool/src/dtoolutil/filename.cxx: In member function 'bool Filename::atomic_read_contents(std::__cxx11::string&) const':
C:/Temp/panda3d-master/dtool/src/dtoolutil/filename.cxx:2845:17: error: 'LOCK_EX' was not declared in this scope
   if (flock(fd, LOCK_EX) != 0) {
                 ^~~~~~~
C:/Temp/panda3d-master/dtool/src/dtoolutil/filename.cxx:2845:17: note: suggested alternative: 'LOCKTYPE'
   if (flock(fd, LOCK_EX) != 0) {
                 ^~~~~~~
                 LOCKTYPE
C:/Temp/panda3d-master/dtool/src/dtoolutil/filename.cxx:2845:7: error: 'flock' was not declared in this scope
   if (flock(fd, LOCK_EX) != 0) {
       ^~~~~
C:/Temp/panda3d-master/dtool/src/dtoolutil/filename.cxx:2845:7: note: suggested alternative: 'clock'
   if (flock(fd, LOCK_EX) != 0) {
       ^~~~~
       clock
In file included from C:\Temp\panda3d-master\dist\cmake\dtool\src\dtoolutil\CMakeFiles\p3dtoolutil.dir\Unity\unity_0_cxx.cxx:27:
C:/Temp/panda3d-master/dtool/src/dtoolutil/win32ArgParser.cxx: In static member function 'static bool Win32ArgParser::do_glob()':
C:/Temp/panda3d-master/dtool/src/dtoolutil/win32ArgParser.cxx:188:17: warning: comparison of integer expressions of different signedness: 'DWORD' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
   if (parent_id != -1) {
       ~~~~~~~~~~^~~~~
mingw32-make[2]: *** [cmake\dtool\src\dtoolutil\CMakeFiles\p3dtoolutil.dir\build.make:82: cmake/dtool/src/dtoolutil/CMakeFiles/p3dtoolutil.dir/Unity/unity_0_cxx.cxx.obj] Error 1
mingw32-make[1]: *** [CMakeFiles\Makefile2:3123: cmake/dtool/src/dtoolutil/CMakeFiles/p3dtoolutil.dir/all] Error 2
mingw32-make: *** [Makefile:159: all] Error 2

I think the algorithm is clear. You just fix all these mistakes one by one.

1% has not been passed yet. It will take a long time, which is why this idea with MinGW after many years has not yet been completed.

A quick investigation showed.

That’s why you get this error.

PHAVE_LOCKF is being set incorrectly by CMake.

I do not understand what it means and how to solve it.

Please, write how to solve this error:

C:/Temp/panda3d-master/dtool/src/dtoolutil/filename.cxx: In member function 'bool Filename::make_canonical()':
C:/Temp/panda3d-master/dtool/src/dtoolutil/filename.cxx:1027:7: error: 'realpath' was not declared in this scope
   if (realpath(c_str(), newpath) != nullptr) {
       ^~~~~~~~

And this:

C:/Temp/panda3d-master/dtool/src/dtoolutil/filename.cxx: In member function 'bool Filename::make_dir() const':
C:/Temp/panda3d-master/dtool/src/dtoolutil/filename.cxx:2517:38: error: too many arguments to function 'int mkdir(const char*)'
     ::mkdir(os_specific.c_str(), 0777);
                                      ^

As for the second problem. Then again, the answer is on the Internet.

And if you follow the error, then in the header file it is most likely declared without arguments.

I don’t understand why you are getting these errors. In both cases this is under an #ifndef _WIN32 block. Is MinGW not setting _WIN32 somehow? Or did you change that code?

Sorry. I forgot to change it in all files. But now I did it with VSCode:

image

But I have this error again:

image

Here:

image