Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Building on latest msys2 chain on windows #2465

Closed
robe2 opened this issue Feb 1, 2023 · 10 comments · Fixed by #2478, #2480 or #2481
Closed

Building on latest msys2 chain on windows #2465

robe2 opened this issue Feb 1, 2023 · 10 comments · Fixed by #2478, #2480 or #2481
Labels
Milestone

Comments

@robe2
Copy link
Member

robe2 commented Feb 1, 2023

@cvvergara I was writing up instructions on how to build on windows with msys2 and mingw64 and ran into a stumbling block

Here are the instructions

all goes smoothly until the build step, which errors in

cd build
cmake -G"Unix Makefiles" ..
cmake --build .
-- Setting build type to 'Release' as none was specified.
-- CMAKE_BUILD_TYPE Release
-- The C compiler identification is GNU 12.2.0
-- The CXX compiler identification is GNU 12.2.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Msys2pgRouting/msys2/mingw64/bin/cc.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:/Msys2pgRouting/msys2/mingw64/bin/c++.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Git: C:/Msys2pgRouting/msys2/usr/bin/git.exe (found version "2.39.1")
-- DOXYGEN_MINIMUM_VERSION=1.7
-- SPHINX_MINIMUM_VERSION=4.0
-- POSTGRESQL_MINIMUM_VERSION=9.2.0
-- BOOST_MINIMUM_VERSION=1.56.0
-- POSTGIS_MINIMUM_VERSION=2.0.0
-- Found Boost: C:/Msys2pgRouting/msys2/mingw64/lib/cmake/Boost-1.81.0/BoostConfig.cmake (found suitable version "1.81.0", minimum required is "1.56.0")
-- Found Perl: C:/Msys2pgRouting/msys2/usr/bin/perl.exe (found version "5.36.0")
-- POSTGRESQL_PG_CONFIG is C:/Msys2pgRouting/msys2/mingw64/bin/pg_config.exe
-- POSTGRESQL_EXECUTABLE is C:/Msys2pgRouting/msys2/mingw64/bin/postgres.exe
-- POSTGRESQL_VERSION_STRING in FindPostgreSQL.cmake is PostgreSQL 15.1
-- POSTGRESQL_INCLUDE_DIR: C:/Msys2pgRouting/msys2/mingw64/include/postgresql/server
-- POSTGRESQL_LIBRARIES: C:/MSYS2P1/msys2/mingw64/lib
-- POSTGRESQL_VERSION_STRING=PostgreSQL 15.1
-- POSTGRESQL_VERSION=15.1
-- PGSQL_VERSION=151
-- LIBRARY_INSTALL_PATH C:/MSYS2P
1/msys2/mingw64/lib/POSTGR~1
-- Performing Test C_COMPILER_SUPPORTS_ROUNDING_MATH
-- Performing Test C_COMPILER_SUPPORTS_ROUNDING_MATH - Success
-- Performing Test CXX_COMPILER_SUPPORTS_ROUNDING_MATH
-- Performing Test CXX_COMPILER_SUPPORTS_ROUNDING_MATH - Success
-- Configuring done
-- Generating done
-- Build files have been written to: C:/projects/pgRouting/build
[ 1%] Building C object src/ordering/CMakeFiles/ordering.dir/cuthillMckeeOrdering.c.obj
[ 1%] Building CXX object src/ordering/CMakeFiles/ordering.dir/cuthillMckeeOrdering_driver.cpp.obj
In file included from C:/projects/pgRouting/include/ordering/cuthillMckeeOrdering.hpp:46,
from C:/projects/pgRouting/src/ordering/cuthillMckeeOrdering_driver.cpp:38:
C:/projects/pgRouting/include/ordering/cuthillMckeeOrdering.hpp: In member function 'std::vector<II_t_rt> pgrouting::functions::CuthillMckeeOrdering::c
uthillMckeeOrdering(G&)':
C:/projects/pgRouting/include/cpp_common/interruption.h:75:15: error: there are no arguments to 'UNBLOCKED_SIGNAL_QUEUE' that depend on a template paramet
er, so a declaration of 'UNBLOCKED_SIGNAL_QUEUE' must be available [-fpermissive]
75 | (unlikely(UNBLOCKED_SIGNAL_QUEUE()) ? pgwin32_dispatch_queued_signals() : 0,
| ^~~~~~~~~~~~~~~~~~~~~~
C:/projects/pgRouting/include/cpp_common/interruption.h:63:39: note: in definition of macro 'unlikely'
63 | #define unlikely(x) __builtin_expect((x) != 0, 0)
| ^
C:/projects/pgRouting/include/cpp_common/interruption.h:82:13: note: in expansion of macro 'INTERRUPTS_PENDING_CONDITION'
82 | if (INTERRUPTS_PENDING_CONDITION())
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:/projects/pgRouting/include/ordering/cuthillMckeeOrdering.hpp:108:10: note: in expansion of macro 'CHECK_FOR_INTERRUPTS'
108 | CHECK_FOR_INTERRUPTS();
| ^~~~~~~~~~~~~~~~~~~~
C:/projects/pgRouting/include/cpp_common/interruption.h:75:15: note: (if you use '-fpermissive', G++ will accept your code, but allowing the use of an und
eclared name is deprecated)
75 | (unlikely(UNBLOCKED_SIGNAL_QUEUE()) ? pgwin32_dispatch_queued_signals() : 0,
| ^~~~~~~~~~~~~~~~~~~~~~
C:/projects/pgRouting/include/cpp_common/interruption.h:63:39: note: in definition of macro 'unlikely'
63 | #define unlikely(x) __builtin_expect((x) != 0, 0)
| ^
C:/projects/pgRouting/include/cpp_common/interruption.h:82:13: note: in expansion of macro 'INTERRUPTS_PENDING_CONDITION'
82 | if (INTERRUPTS_PENDING_CONDITION())
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:/projects/pgRouting/include/ordering/cuthillMckeeOrdering.hpp:108:10: note: in expansion of macro 'CHECK_FOR_INTERRUPTS'
108 | CHECK_FOR_INTERRUPTS();
| ^~~~~~~~~~~~~~~~~~~~
C:/projects/pgRouting/include/ordering/cuthillMckeeOrdering.hpp: In instantiation of 'std::vector<II_t_rt> pgrouting::functions::CuthillMckeeOrdering::
cuthillMckeeOrdering(G&) [with G = pgrouting::graph::Pgr_base_graph<boost::adjacency_list<boost::vecS, boost::vecS, boost::undirectedS, pgrouting::Basic_v
ertex, pgrouting::Basic_edge>, pgrouting::Basic_vertex, pgrouting::Basic_edge>]':
C:/projects/pgRouting/src/ordering/cuthillMckeeOrdering_driver.cpp:63:64: required from 'std::vector<II_t_rt> cuthillMckeeOrdering(G&) [with G = pgrouti
ng::graph::Pgr_base_graph<boost::adjacency_list<boost::vecS, boost::vecS, boost::undirectedS, pgrouting::Basic_vertex, pgrouting::Basic_edge>, pgrouting::
Basic_vertex, pgrouting::Basic_edge>]'
C:/projects/pgRouting/src/ordering/cuthillMckeeOrdering_driver.cpp:117:39: required from here
C:/projects/pgRouting/include/cpp_common/interruption.h:75:37: error: 'UNBLOCKED_SIGNAL_QUEUE' was not declared in this scope
75 | (unlikely(UNBLOCKED_SIGNAL_QUEUE()) ? pgwin32_dispatch_queued_signals() : 0,
| ^
C:/projects/pgRouting/include/cpp_common/interruption.h:63:39: note: in definition of macro 'unlikely'
63 | #define unlikely(x) __builtin_expect((x) != 0, 0)
| ^
C:/projects/pgRouting/include/cpp_common/interruption.h:82:13: note: in expansion of macro 'INTERRUPTS_PENDING_CONDITION'
82 | if (INTERRUPTS_PENDING_CONDITION())
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:/projects/pgRouting/include/ordering/cuthillMckeeOrdering.hpp:108:10: note: in expansion of macro 'CHECK_FOR_INTERRUPTS'
108 | CHECK_FOR_INTERRUPTS();
| ^~~~~~~~~~~~~~~~~~~~
make[2]: *** [src/ordering/CMakeFiles/ordering.dir/build.make:92: src/ordering/CMakeFiles/ordering.dir/cuthillMckeeOrdering_driver.cpp.obj] Error 1
make[1]: *** [CMakeFiles/Makefile2:2279: src/ordering/CMakeFiles/ordering.dir/all] Error 2
make: *** [Makefile:136: all] Error 2

@robe2 robe2 added the bug label Feb 1, 2023
@cvvergara
Copy link
Member

possibility 1

From

-- The C compiler identification is GNU 12.2.0
-- The CXX compiler identification is GNU 12.2.0

maybe its the compiler version
Try to compile with lower version (like 9)

Need to contact @estebanzimanyi or @mbakli They wrote this code

@cvvergara
Copy link
Member

I installed g++-12 and got some other warnings that I just fixed on #2472
and I don't think that solved this problem.

@estebanzimanyi
Copy link

The fix we proposed a few years ago was based on the solution used in PostGIS which also uses the function
CHECK_FOR_INTERRUPTS(); /* give interrupter a chance */
e.g.,
https://github.com/postgis/postgis/blob/master/libpgcommon/lwgeom_pg.c#L291

@uzmaansari23
Copy link

The error message is indicating that there is no declaration available for UNBLOCKED_SIGNAL_QUEUE, which is used in the cpp_common/interruption.h header file. This could be due to a missing include file, a missing definition or macro, or an incorrect configuration. The error message suggests using the -fpermissive flag with G++ to allow the code to compile, but this is not a recommended solution as it could introduce other issues.

One possible solution is to check if the necessary header files and macros are included in the source code and that the code is correctly configured. It may also be necessary to update the version of the compiler or any relevant dependencies. Another option is to seek help from the community or the developers of the software to resolve the issue.

@robe2
Copy link
Member Author

robe2 commented Mar 1, 2023

Okay I'm still getting errors but in a different place. I should note this is against develop branch.
I'll try against main in a bit.

Now I get:

[  0%] Building C object src/circuits/CMakeFiles/circuits.dir/hawickCircuits.c.obj
[  1%] Building CXX object src/circuits/CMakeFiles/circuits.dir/hawickCircuits_driver.cpp.obj
In file included from C:/Msys2pgRouting/msys2/mingw64/include/postgresql/server/port/win32_port.h:6
,
                 from C:/Msys2pgRouting/msys2/mingw64/include/postgresql/server/port.h:24,
                 from C:/Msys2pgRouting/msys2/mingw64/include/postgresql/server/c.h:1388,
                 from C:/Msys2pgRouting/msys2/mingw64/include/postgresql/server/postgres.h:46,
                 from C:/projects/pgRouting/include/cpp_common/interruption.h:38,
                 from C:/projects/pgRouting/include/circuits/hawickcircuits.hpp:41,
                 from C:/projects/pgRouting/src/circuits/hawickCircuits_driver.cpp:41:
C:/Msys2pgRouting/msys2/mingw64/include/sys/stat.h: In function 'int microsoft_native_fstat(int, mic
rosoft_native_stat*)':
C:/Msys2pgRouting/msys2/mingw64/include/sys/stat.h:226:20: error: invalid application of 'sizeof' to
 incomplete type 'microsoft_native_stat'
  226 |     memset(_Stat,0,sizeof(struct stat));
      |                    ^~~~~~~~~~~~~~~~~~~
C:/Msys2pgRouting/msys2/mingw64/include/sys/stat.h:231:8: error: invalid use of incomplete type 'str
uct microsoft_native_stat'
  231 |   _Stat->st_dev=st.st_dev;
      |        ^~
C:/Msys2pgRouting/msys2/mingw64/include/sys/stat.h:174:36: note: forward declaration of 'struct micr
osoft_native_stat'
  174 | int __cdecl fstat(int _Desc,struct stat *_Stat);
      |                                    ^~~~
C:/Msys2pgRouting/msys2/mingw64/include/sys/stat.h:232:8: error: invalid use of incomplete type 'str
uct microsoft_native_stat'
  232 |   _Stat->st_ino=st.st_ino;
      |        ^~
C:/Msys2pgRouting/msys2/mingw64/include/sys/stat.h:174:36: note: forward declaration of 'struct micr
osoft_native_stat'
  174 | int __cdecl fstat(int _Desc,struct stat *_Stat);
      |                                    ^~~~
C:/Msys2pgRouting/msys2/mingw64/include/sys/stat.h:233:8: error: invalid use of incomplete type 'str
uct microsoft_native_stat'
  233 |   _Stat->st_mode=st.st_mode;
      |        ^~
C:/Msys2pgRouting/msys2/mingw64/include/sys/stat.h:174:36: note: forward declaration of 'struct micr
osoft_native_stat'
  174 | int __cdecl fstat(int _Desc,struct stat *_Stat);
      |                                    ^~~~
C:/Msys2pgRouting/msys2/mingw64/include/sys/stat.h:234:8: error: invalid use of incomplete type 'str
uct microsoft_native_stat'
  234 |   _Stat->st_nlink=st.st_nlink;
      |        ^~
C:/Msys2pgRouting/msys2/mingw64/include/sys/stat.h:174:36: note: forward declaration of 'struct micr
osoft_native_stat'
  174 | int __cdecl fstat(int _Desc,struct stat *_Stat);
      |                                    ^~~~
C:/Msys2pgRouting/msys2/mingw64/include/sys/stat.h:235:8: error: invalid use of incomplete type 'str
uct microsoft_native_stat'
  235 |   _Stat->st_uid=st.st_uid;
      |        ^~
C:/Msys2pgRouting/msys2/mingw64/include/sys/stat.h:174:36: note: forward declaration of 'struct micr
osoft_native_stat'
  174 | int __cdecl fstat(int _Desc,struct stat *_Stat);
      |                                    ^~~~
C:/Msys2pgRouting/msys2/mingw64/include/sys/stat.h:236:8: error: invalid use of incomplete type 'str
uct microsoft_native_stat'
  236 |   _Stat->st_gid=st.st_gid;
      |        ^~
C:/Msys2pgRouting/msys2/mingw64/include/sys/stat.h:174:36: note: forward declaration of 'struct micr
osoft_native_stat'
  174 | int __cdecl fstat(int _Desc,struct stat *_Stat);
      |                                    ^~~~
C:/Msys2pgRouting/msys2/mingw64/include/sys/stat.h:237:8: error: invalid use of incomplete type 'str
uct microsoft_native_stat'
  237 |   _Stat->st_rdev=st.st_rdev;
      |        ^~
C:/Msys2pgRouting/msys2/mingw64/include/sys/stat.h:174:36: note: forward declaration of 'struct micr
osoft_native_stat'
  174 | int __cdecl fstat(int _Desc,struct stat *_Stat);
      |                                    ^~~~
C:/Msys2pgRouting/msys2/mingw64/include/sys/stat.h:238:8: error: invalid use of incomplete type 'str
uct microsoft_native_stat'
  238 |   _Stat->st_size=(_off_t) st.st_size;
      |        ^~
C:/Msys2pgRouting/msys2/mingw64/include/sys/stat.h:174:36: note: forward declaration of 'struct micr
osoft_native_stat'
  174 | int __cdecl fstat(int _Desc,struct stat *_Stat);
      |                                    ^~~~
C:/Msys2pgRouting/msys2/mingw64/include/sys/stat.h:239:8: error: invalid use of incomplete type 'str
uct microsoft_native_stat'
  239 |   _Stat->st_atime=st.st_atime;
      |        ^~
C:/Msys2pgRouting/msys2/mingw64/include/sys/stat.h:174:36: note: forward declaration of 'struct micr
osoft_native_stat'
  174 | int __cdecl fstat(int _Desc,struct stat *_Stat);
      |                                    ^~~~
C:/Msys2pgRouting/msys2/mingw64/include/sys/stat.h:240:8: error: invalid use of incomplete type 'str
uct microsoft_native_stat'
  240 |   _Stat->st_mtime=st.st_mtime;
      |        ^~
C:/Msys2pgRouting/msys2/mingw64/include/sys/stat.h:174:36: note: forward declaration of 'struct micr
osoft_native_stat'
  174 | int __cdecl fstat(int _Desc,struct stat *_Stat);
      |                                    ^~~~
C:/Msys2pgRouting/msys2/mingw64/include/sys/stat.h:241:8: error: invalid use of incomplete type 'str
uct microsoft_native_stat'
  241 |   _Stat->st_ctime=st.st_ctime;
      |        ^~
C:/Msys2pgRouting/msys2/mingw64/include/sys/stat.h:174:36: note: forward declaration of 'struct micr
osoft_native_stat'
  174 | int __cdecl fstat(int _Desc,struct stat *_Stat);
      |                                    ^~~~
C:/Msys2pgRouting/msys2/mingw64/include/postgresql/server/port/win32_port.h: At global scope:
C:/Msys2pgRouting/msys2/mingw64/include/postgresql/server/port/win32_port.h:264:8: error: redefiniti
on of 'struct stat'
  264 | struct stat                                             /* This should match struct __stat64
 */
      |        ^~~~
In file included from C:/Msys2pgRouting/msys2/mingw64/include/wchar.h:413,
                 from C:/Msys2pgRouting/msys2/mingw64/include/c++/12.2.0/cwchar:44,
                 from C:/Msys2pgRouting/msys2/mingw64/include/c++/12.2.0/bits/postypes.h:40,
                 from C:/Msys2pgRouting/msys2/mingw64/include/c++/12.2.0/iosfwd:40,
                 from C:/Msys2pgRouting/msys2/mingw64/include/c++/12.2.0/ios:38,
                 from C:/Msys2pgRouting/msys2/mingw64/include/c++/12.2.0/istream:38,
                 from C:/Msys2pgRouting/msys2/mingw64/include/c++/12.2.0/sstream:38,
                 from C:/projects/pgRouting/src/circuits/hawickCircuits_driver.cpp:32:
C:/Msys2pgRouting/msys2/mingw64/include/_mingw_stat64.h:40:10: note: previous definition of 'struct
stat'
   40 |   struct stat {
      |          ^~~~
In file included from C:/projects/pgRouting/include/cpp_common/interruption.h:39:
C:/projects/pgRouting/include/circuits/hawickcircuits.hpp: In member function 'std::deque<circuits_r
t> pgrouting::functions::pgr_hawickCircuits<G>::hawickCircuits(G&)':
C:/projects/pgRouting/include/circuits/hawickcircuits.hpp:135:9: error: second operand to the condit
ional operator is of type 'void', but the third operand is neither a throw-expression nor of type 'v
oid'
  135 |         CHECK_FOR_INTERRUPTS();
      |         ^~~~~~~~~~~~~~~~~~~~
make[2]: *** [src/circuits/CMakeFiles/circuits.dir/build.make:92: src/circuits/CMakeFiles/circuits.d
ir/hawickCircuits_driver.cpp.obj] Error 1
make[1]: *** [CMakeFiles/Makefile2:2305: src/circuits/CMakeFiles/circuits.dir/all] Error 2
make: *** [Makefile:136: all] Error 2

@robe2 robe2 reopened this Mar 1, 2023
@robe2
Copy link
Member Author

robe2 commented Mar 1, 2023

Nope same problem with main. I'll try @estebanzimanyi suggestion later.

@uzmaansari23
Copy link

Add the following line at the beginning of your C++ code to include the sys/stat.h header file:
#include <sys/stat.h>
If it does not work check the version of mingw64 and PostgreSQL you are using. It is possible that there is an incompatibility issue between the two versions.

@robe2 robe2 added this to the Release 3.5.0 milestone Mar 1, 2023
@robe2
Copy link
Member Author

robe2 commented Mar 1, 2023

On winnie (PostGIS Build bot), main branch is broken:

https://winnie.postgis.net/job/pgRouting_PGVersionEDB/9941/console

/hawickCircuits_driver.cpp.obj.d -o CMakeFiles/circuits.dir/hawickCircuits_driver.cpp.obj -c /E/jenkins/pgrouting/branches/3.5/src/circuits/hawickCircuits_driver.cpp
In file included from E:/jenkins/postgresql/rel/pg15w64gcc81/include/server/port/win32_port.h:66,
                 from E:/jenkins/postgresql/rel/pg15w64gcc81/include/server/port.h:24,
                 from E:/jenkins/postgresql/rel/pg15w64gcc81/include/server/c.h:1387,
                 from E:/jenkins/postgresql/rel/pg15w64gcc81/include/server/postgres.h:46,
                 from E:/jenkins/pgrouting/branches/3.5/include/cpp_common/interruption.h:38,
                 from E:/jenkins/pgrouting/branches/3.5/include/circuits/hawickcircuits.hpp:41,
                 from E:/jenkins/pgrouting/branches/3.5/src/circuits/hawickCircuits_driver.cpp:41:
C:/ming64gcc81/mingw64/x86_64-w64-mingw32/include/sys/stat.h: In function 'int microsoft_native_fstat(int, microsoft_native_stat*)':
C:/ming64gcc81/mingw64/x86_64-w64-mingw32/include/sys/stat.h:226:38: error: invalid application of 'sizeof' to incomplete type 'microsoft_native_stat'
     memset(_Stat,0,sizeof(struct stat))

But the develop branch at least compiles. I have to check why the tests aren't running on that.
Winnie is running gcc 8.1.0 and mingw64/msys2

But unfortunately my new chain setup gcc 12.1 msys2, mingw64 (using cmake -G 'Unix Makefiles'
gives on develop branch

In file included from C:/projects/pgRouting/include/circuits/hawickcircuits.hpp:41,
from C:/projects/pgRouting/src/circuits/hawickCircuits_driver.cpp:41:
C:/projects/pgRouting/include/circuits/hawickcircuits.hpp: In member function 'std::deque<circuits_rt> pgrouting::functions::pgr_hawickCircuits::hawickCircuit
s(G&)':
C:/projects/pgRouting/include/cpp_common/interruption.h:75:15: error: there are no arguments to 'UNBLOCKED_SIGNAL_QUEUE' that depend on a template parameter, so
a declaration of 'UNBLOCKED_SIGNAL_QUEUE' must be available [-fpermissive]
75 | (unlikely(UNBLOCKED_SIGNAL_QUEUE()) ? pgwin32_dispatch_queued_signals() : 0,
| ^~~~~~~~~~~~~~~~~~~~~~
C:/projects/pgRouting/include/cpp_common/interruption.h:63:39: note: in definition of macro 'unlikely'
63 | #define unlikely(x) __builtin_expect((x) != 0, 0)
| ^
C:/projects/pgRouting/include/cpp_common/interruption.h:82:13: note: in expansion of macro 'INTERRUPTS_PENDING_CONDITION'
82 | if (INTERRUPTS_PENDING_CONDITION())
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:/projects/pgRouting/include/circuits/hawickcircuits.hpp:135:9: note: in expansion of macro 'CHECK_FOR_INTERRUPTS'
135 | CHECK_FOR_INTERRUPTS();
| ^~~~~~~~~~~~~~~~~~~~
C:/projects/pgRouting/include/cpp_common/interruption.h:75:15: note: (if you use '-fpermissive', G++ will accept your code, but allowing the use of an undeclared
name is deprecated)
75 | (unlikely(UNBLOCKED_SIGNAL_QUEUE()) ? pgwin32_dispatch_queued_signals() : 0,
| ^~~~~~~~~~~~~~~~~~~~~~
C:/projects/pgRouting/include/cpp_common/interruption.h:63:39: note: in definition of macro 'unlikely'
63 | #define unlikely(x) __builtin_expect((x) != 0, 0)
| ^
C:/projects/pgRouting/include/cpp_common/interruption.h:82:13: note: in expansion of macro 'INTERRUPTS_PENDING_CONDITION'
82 | if (INTERRUPTS_PENDING_CONDITION())
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:/projects/pgRouting/include/circuits/hawickcircuits.hpp:135:9: note: in expansion of macro 'CHECK_FOR_INTERRUPTS'
135 | CHECK_FOR_INTERRUPTS();
| ^~~~~~~~~~~~~~~~~~~~
C:/projects/pgRouting/include/circuits/hawickcircuits.hpp: In instantiation of 'std::deque<circuits_rt> pgrouting::functions::pgr_hawickCircuits::hawickCircui
ts(G&) [with G = pgrouting::graph::Pgr_base_graph<boost::adjacency_list<boost::vecS, boost::vecS, boost::bidirectionalS, pgrouting::Basic_vertex, pgrouting::Basi
c_edge>, pgrouting::Basic_vertex, pgrouting::Basic_edge>]':
C:/projects/pgRouting/src/circuits/hawickCircuits_driver.cpp:57:52: required from 'std::deque<circuits_rt> pgr_hawickCircuits(G&) [with G = pgrouting::graph::P
gr_base_graph<boost::adjacency_list<boost::vecS, boost::vecS, boost::bidirectionalS, pgrouting::Basic_vertex, pgrouting::Basic_edge>, pgrouting::Basic_vertex, pg
routing::Basic_edge>]'
C:/projects/pgRouting/src/circuits/hawickCircuits_driver.cpp:112:37: required from here
C:/projects/pgRouting/include/cpp_common/interruption.h:75:37: error: 'UNBLOCKED_SIGNAL_QUEUE' was not declared in this scope
75 | (unlikely(UNBLOCKED_SIGNAL_QUEUE()) ? pgwin32_dispatch_queued_signals() : 0,
| ^
C:/projects/pgRouting/include/cpp_common/interruption.h:63:39: note: in definition of macro 'unlikely'
63 | #define unlikely(x) __builtin_expect((x) != 0, 0)
| ^
C:/projects/pgRouting/include/cpp_common/interruption.h:82:13: note: in expansion of macro 'INTERRUPTS_PENDING_CONDITION'
82 | if (INTERRUPTS_PENDING_CONDITION())
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:/projects/pgRouting/include/circuits/hawickcircuits.hpp:135:9: note: in expansion of macro 'CHECK_FOR_INTERRUPTS'
135 | CHECK_FOR_INTERRUPTS();
| ^~~~~~~~~~~~~~~~~~~~
make[2]: *** [src/circuits/CMakeFiles/circuits.dir/build.make:92: src/circuits/CMakeFiles/circuits.dir/hawickCircuits_driver.cpp.obj] Error 1
make[1]: *** [CMakeFiles/Makefile2:2305: src/circuits/CMakeFiles/circuits.dir/all] Error 2
make: *** [Makefile:136: all] Error 2

So I think the stats issue is no longer an issue (at least not in develop)

@robe2
Copy link
Member Author

robe2 commented Mar 1, 2023

Okay I think I see the issue now, it's still compiling but got passed that step.

the issue is with the interrupt.h.

Since WIN32 is defined, it's falling into the the else branch which mucks up everything.
I have to figure out what variable to use to prevent it from doing that and make sure it doesn't break my current setup.

changing #ifndef true

fixes the compile issue

   /* Test whether an interrupt is pending */
#ifndef WIN32
#define INTERRUPTS_PENDING_CONDITION() \
    (unlikely(InterruptPending))
#else
    extern void pgwin32_dispatch_queued_signals(void);
#define INTERRUPTS_PENDING_CONDITION() \
    (unlikely(UNBLOCKED_SIGNAL_QUEUE()) ? pgwin32_dispatch_queued_signals() : 0, \
     unlikely(InterruptPending))
#endif

Note that main is broken in both my current setup (winnie) and my new setup. So develop is a clear winner.

@cvvergara
Copy link
Member

Rolled back to original interrupts file

robe2 added a commit that referenced this issue Mar 2, 2023
* Fix mingw64 compile on newer mingw64 closes #2465

* Update locale: commit 4f4c646

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
4 participants