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

Win build 7.0.3 with cmake (static libs because of upstream issues) #73

Merged
merged 83 commits into from
Mar 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
83 commits
Select commit Hold shift + click to select a range
6e83e73
Try win build
Tobias-Fischer Jan 30, 2023
92d10f1
Create bld-scotch.bat
Tobias-Fischer Jan 30, 2023
ad7ceb8
Add ninja
Tobias-Fischer Jan 30, 2023
93e3b34
MNT: Re-rendered with conda-build 3.23.3, conda-smithy 3.22.1, and co…
Jan 30, 2023
34aca54
Fixup
Tobias-Fischer Jan 30, 2023
9fc7a2b
no openmpi on Win
Tobias-Fischer Jan 30, 2023
ad7ebfa
MNT: Re-rendered with conda-build 3.23.3, conda-smithy 3.22.1, and co…
Jan 30, 2023
4536a19
msmpi
Tobias-Fischer Jan 30, 2023
7a6c07f
MNT: Re-rendered with conda-build 3.23.3, conda-smithy 3.22.1, and co…
Jan 30, 2023
097c7e5
Fixup?
Tobias-Fischer Jan 30, 2023
232c4ed
Fixup
Tobias-Fischer Jan 30, 2023
06f532b
winflexbison
Tobias-Fischer Jan 30, 2023
003b1d4
- winflexbison
Tobias-Fischer Jan 30, 2023
8630bf9
Fixup
Tobias-Fischer Jan 30, 2023
0720248
Create 0006-fix-win-build.patch
Tobias-Fischer Jan 31, 2023
cc76d52
Use 0006-fix-win-build.patch
Tobias-Fischer Jan 31, 2023
dd4b4ed
pthreads-win32
Tobias-Fischer Jan 31, 2023
17d4655
pthreads also in run
Tobias-Fischer Jan 31, 2023
9f4c696
Merge branch 'main' into win-build
Tobias-Fischer Mar 3, 2023
ef00fb4
Rename 0006-fix-win-build.patch to 0007-fix-win-build.patch
Tobias-Fischer Mar 3, 2023
61dd201
Delete 0007-fix-win-build.patch
Tobias-Fischer Mar 3, 2023
aa8822b
Update meta.yaml
Tobias-Fischer Mar 3, 2023
d7f4a5f
MNT: Re-rendered with conda-build 3.23.3, conda-smithy 3.23.0, and co…
Mar 3, 2023
56d91c5
Create 0007-fix-empty-union.patch
Tobias-Fischer Mar 3, 2023
12867a7
Use 0007-fix-empty-union.patch
Tobias-Fischer Mar 3, 2023
325c695
Create 0008-win-fix-ssize_t.patch
Tobias-Fischer Mar 3, 2023
d756ade
Update meta.yaml
Tobias-Fischer Mar 3, 2023
789cae7
Try
Tobias-Fischer Mar 5, 2023
a8ff7b7
Fixup
Tobias-Fischer Mar 5, 2023
f28cabd
-DCMAKE_INSTALL_RPATH=${PREFIX}/lib \
Tobias-Fischer Mar 5, 2023
32e0cd9
Create 0010-fix-win-flex.patch
Tobias-Fischer Mar 5, 2023
515f772
Update meta.yaml
Tobias-Fischer Mar 5, 2023
5fef590
Update 0008-win-fix-ssize_t.patch
Tobias-Fischer Mar 5, 2023
9866fbe
Create 0009-win-fix-context.c.patch
Tobias-Fischer Mar 5, 2023
ece82b7
Rename 0010-fix-win-flex.patch to 0010-win-fix-flex.patch
Tobias-Fischer Mar 5, 2023
4f58a59
Update meta.yaml
Tobias-Fischer Mar 5, 2023
d617665
Update 0010-win-fix-flex.patch
Tobias-Fischer Mar 5, 2023
41034d7
Create 0011-win-do-not-link-m.patch
Tobias-Fischer Mar 5, 2023
f8811df
Update meta.yaml
Tobias-Fischer Mar 5, 2023
9c9e781
No pthreads on Win
Tobias-Fischer Mar 5, 2023
7b9d1a5
Use win threads
Tobias-Fischer Mar 5, 2023
d052a86
Debug
Tobias-Fischer Mar 6, 2023
19063e3
Update bld-scotch.bat
Tobias-Fischer Mar 6, 2023
799ec0c
Create 0012-win-fix-threads.patch
Tobias-Fischer Mar 6, 2023
649eee9
Use 0012-win-fix-threads.patch
Tobias-Fischer Mar 6, 2023
5887092
Create 0013-win-fix-graph-match-scan.patch
Tobias-Fischer Mar 6, 2023
656d63f
Update meta.yaml
Tobias-Fischer Mar 6, 2023
cbc7737
Create 0014-win-fix-sys-time-include.patch
Tobias-Fischer Mar 6, 2023
22d0308
Use 0014-win-fix-sys-time-include.patch
Tobias-Fischer Mar 6, 2023
14f8f6d
Create 0014-win-fix-unistd-include.patch
Tobias-Fischer Mar 6, 2023
aebb096
Use 0014-win-fix-unistd-include.patch
Tobias-Fischer Mar 6, 2023
4f6b8bd
Rename 0014-win-fix-unistd-include.patch to 0015-win-fix-unistd-inclu…
Tobias-Fischer Mar 6, 2023
25cd749
Update 0015-win-fix-unistd-include.patch
Tobias-Fischer Mar 6, 2023
cc3de8c
Create 0016-win-disable-fortran-test.patch
Tobias-Fischer Mar 6, 2023
0efce82
Update meta.yaml
Tobias-Fischer Mar 6, 2023
bc9d305
Update and rename 0015-win-fix-unistd-include.patch to 0015-win-fix-u…
Tobias-Fischer Mar 6, 2023
6a1727c
Delete 0014-win-fix-sys-time-include.patch
Tobias-Fischer Mar 6, 2023
7c473a2
Update meta.yaml
Tobias-Fischer Mar 6, 2023
db93455
Rename 0016-win-disable-fortran-test.patch to 0014-win-disable-fortra…
Tobias-Fischer Mar 6, 2023
8b68da7
Shared libs on Win
Tobias-Fischer Mar 6, 2023
0c961d3
Update meta.yaml
Tobias-Fischer Mar 6, 2023
a4e7ddb
Update 0011-win-do-not-link-m.patch
Tobias-Fischer Mar 6, 2023
4097b53
win export symbols
Tobias-Fischer Mar 6, 2023
ea8e8f9
Update 0004-fix-language-requirement.patch
Tobias-Fischer Mar 9, 2023
72caf65
Create 0016-win-fix-exports.patch
Tobias-Fischer Mar 9, 2023
152dd45
Update meta.yaml
Tobias-Fischer Mar 9, 2023
7e41c70
Update 0011-win-do-not-link-m.patch
Tobias-Fischer Mar 9, 2023
e526b2d
Update 0016-win-fix-exports.patch
Tobias-Fischer Mar 9, 2023
6b33c16
Update 0016-win-fix-exports.patch
Tobias-Fischer Mar 9, 2023
344c1b9
Update 0016-win-fix-exports.patch
Tobias-Fischer Mar 9, 2023
d1b61e2
Update 0016-win-fix-exports.patch
Tobias-Fischer Mar 9, 2023
7e2062f
Update 0016-win-fix-exports.patch
Tobias-Fischer Mar 9, 2023
871a3ef
Update 0016-win-fix-exports.patch
Tobias-Fischer Mar 9, 2023
e9a8b2d
Update 0016-win-fix-exports.patch
Tobias-Fischer Mar 9, 2023
1cdacc3
Delete 0016-win-fix-exports.patch
Tobias-Fischer Mar 13, 2023
f21c473
Update 0011-win-do-not-link-m.patch
Tobias-Fischer Mar 13, 2023
28bed06
Update meta.yaml
Tobias-Fischer Mar 14, 2023
322775e
Static libs for now
Tobias-Fischer Mar 14, 2023
740a51d
Fix win tests
Tobias-Fischer Mar 15, 2023
e5c507c
More fixes
Tobias-Fischer Mar 15, 2023
9d19c32
Update 0004-fix-language-requirement.patch
Tobias-Fischer Mar 15, 2023
9dc6ee3
Update 0013-win-fix-graph-match-scan.patch
Tobias-Fischer Mar 15, 2023
2a339f4
Remove testing stuff
Tobias-Fischer Mar 20, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
86 changes: 86 additions & 0 deletions .azure-pipelines/azure-pipelines-win.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 26 additions & 0 deletions .ci_support/win_64_.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
bzip2:
- '1'
c_compiler:
- vs2019
channel_sources:
- conda-forge
channel_targets:
- conda-forge main
cxx_compiler:
- vs2019
fortran_compiler:
- flang
fortran_compiler_version:
- '5'
mpi:
- msmpi
mpich:
- '4'
openmpi:
- '4'
target_platform:
- win-64
xz:
- '5'
zlib:
- '1.2'
4 changes: 2 additions & 2 deletions .scripts/build_steps.sh

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions .scripts/run_osx_build.sh

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

32 changes: 29 additions & 3 deletions README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions azure-pipelines.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion recipe/0004-fix-language-requirement.patch
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,15 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt
index f829e15..2dafd78 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -41,9 +41,8 @@
@@ -41,9 +41,9 @@
## ##
############################################################

-project(SCOTCH)
cmake_minimum_required(VERSION 3.10)
-enable_language(C Fortran)
+project(SCOTCH LANGUAGES C Fortran)
+

# Add module directory
list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/Modules)
Expand Down
18 changes: 18 additions & 0 deletions recipe/0007-fix-empty-union.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
diff --git a/src/libscotch/common_thread.h b/src/libscotch/common_thread.h
index 235d920..ed47fe1 100644
--- a/src/libscotch/common_thread.h
+++ b/src/libscotch/common_thread.h
@@ -78,11 +78,11 @@ typedef struct ThreadContext_ {
volatile unsigned int bainnum; /*+ Number of barrier instance +*/
pthread_mutex_t lockdat; /*+ Lock for updating status +*/
pthread_cond_t conddat; /*+ Wakeup condition for slave threads +*/
- union { /*+ Context save area for main thread +*/
#ifdef COMMON_PTHREAD_AFFINITY_LINUX
+ union { /*+ Context save area for main thread +*/
cpu_set_t cpusdat; /*+ Original thread mask of main thread +*/
-#endif /* COMMON_PTHREAD_AFFINITY_LINUX */
} savedat;
+#endif /* COMMON_PTHREAD_AFFINITY_LINUX */
#endif /* COMMON_PTHREAD */
} ThreadContext;

30 changes: 30 additions & 0 deletions recipe/0008-win-fix-ssize_t.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
diff --git a/src/libscotch/common_file_compress.c b/src/libscotch/common_file_compress.c
index e1ccff5..e8e36ad 100644
--- a/src/libscotch/common_file_compress.c
+++ b/src/libscotch/common_file_compress.c
@@ -69,6 +69,10 @@
#include "lzma.h"
#endif /* COMMON_FILE_COMPRESS_LZMA */

+#if defined COMMON_OS_WINDOWS
+#define ssize_t SSIZE_T
+#endif
+
/*
** The static definitions.
*/
diff --git a/src/libscotch/common_file_decompress.c b/src/libscotch/common_file_decompress.c
index 648b6f0..9188eb0 100644
--- a/src/libscotch/common_file_decompress.c
+++ b/src/libscotch/common_file_decompress.c
@@ -69,6 +69,10 @@
#include "lzma.h"
#endif /* COMMON_FILE_COMPRESS_LZMA */

+#if defined COMMON_OS_WINDOWS
+#define ssize_t SSIZE_T
+#endif
+
/*
** The static definitions.
*/
24 changes: 24 additions & 0 deletions recipe/0009-win-fix-context.c.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
diff --git a/src/libscotch/context.c b/src/libscotch/context.c
index 6becac0..aa78fae 100644
--- a/src/libscotch/context.c
+++ b/src/libscotch/context.c
@@ -70,7 +70,7 @@ static struct ContextValuesData_ {
#else /* ((defined SCOTCH_DETERMINISTIC) || (defined COMMON_RANDOM_FIXED_SEED)) */
0
#endif /* ((defined SCOTCH_DETERMINISTIC) || (defined COMMON_RANDOM_FIXED_SEED)) */
- }, { } };
+ } };

/***********************************/
/* */
@@ -88,7 +88,7 @@ int
contextOptionsInit (
Context * const contptr)
{
- return (contextValuesInit (contptr, &contextvaluesdat, sizeof (contextvaluesdat),
- CONTEXTOPTIONNUMNBR, (void *) &contextvaluesdat.vinttab - (void *) &contextvaluesdat,
- CONTEXTOPTIONDBLNBR, (void *) &contextvaluesdat.vdbltab - (void *) &contextvaluesdat));
+ size_t offset = sizeof(contextvaluesdat.vinttab);
+ return contextValuesInit(contptr, &contextvaluesdat, sizeof(contextvaluesdat), CONTEXTOPTIONNUMNBR,
+ offset, CONTEXTOPTIONDBLNBR, offset + sizeof(contextvaluesdat.vinttab));
}
21 changes: 21 additions & 0 deletions recipe/0010-win-fix-flex.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
diff --git a/src/libscotch/CMakeLists.txt b/src/libscotch/CMakeLists.txt
index e3b0cb9..77dc24c 100644
--- a/src/libscotch/CMakeLists.txt
+++ b/src/libscotch/CMakeLists.txt
@@ -140,9 +140,15 @@ add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/parser_ll.l
COMMENT "Copy parser_ll.l to CMake binary directory")
add_custom_target(parser_ll_l DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/parser_ll.l)

+if(WIN32)
+ set(FLEX_FLAG "--wincompat")
+else()
+ set(FLEX_FLAG "")
+endif()
+
# Generate parser_ll.c using Flex
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/parser_ll.c
- COMMAND ${FLEX_EXECUTABLE} "-Pscotchyy${SCOTCH_NAME_SUFFIX}" "-oparser_ll.c" parser_ll.l
+ COMMAND ${FLEX_EXECUTABLE} "-Pscotchyy${SCOTCH_NAME_SUFFIX}" "${FLEX_FLAG}" "-oparser_ll.c" parser_ll.l
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/parser_ll.l module.h common.h parser.h parser_ll.h parser_ly.h
COMMENT "Generate parser_ll.c using Flex")
add_custom_target(parser_ll_c DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/parser_ll.c)
35 changes: 35 additions & 0 deletions recipe/0011-win-do-not-link-m.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
diff --git a/src/libscotch/CMakeLists.txt b/src/libscotch/CMakeLists.txt
index e3b0cb9..480306f 100644
--- a/src/libscotch/CMakeLists.txt
+++ b/src/libscotch/CMakeLists.txt
@@ -505,10 +511,14 @@ set(SCOTCH_C_SOURCES

add_library(scotch
${SCOTCH_C_SOURCES})
+
set_target_properties(scotch PROPERTIES VERSION
${SCOTCH_VERSION}.${SCOTCH_RELEASE}.${SCOTCH_PATCHLEVEL})
add_dependencies(scotch parser_yy_c parser_ll_c)
-target_link_libraries(scotch PUBLIC m)
+if(NOT WIN32)
+ target_link_libraries(scotch PUBLIC m)
+endif()
+target_link_libraries(scotch PUBLIC scotcherr)
target_include_directories(scotch PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>
diff --git a/src/scotch/CMakeLists.txt b/src/scotch/CMakeLists.txt
index 3974f4f..30143cb 100644
--- a/src/scotch/CMakeLists.txt
+++ b/src/scotch/CMakeLists.txt
@@ -110,7 +110,9 @@ endforeach()

# Targets which need special source lists
add_scotch_exe(gout gout_c.c gout_o.c)
-target_link_libraries(gout PRIVATE m)
+if(NOT WIN32)
+ target_link_libraries(gout PRIVATE m)
+endif()

# gpart is a special target (same source as gmap)
add_scotch_exe(gpart gmap.c gmap.h)
44 changes: 44 additions & 0 deletions recipe/0012-win-fix-threads.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
diff --git a/src/libscotch/CMakeLists.txt b/src/libscotch/CMakeLists.txt
index e3b0cb9..006be7d 100644
--- a/src/libscotch/CMakeLists.txt
+++ b/src/libscotch/CMakeLists.txt
@@ -541,7 +549,7 @@ endif()
# Add thread library
if(Threads_FOUND)
target_compile_definitions(scotch PUBLIC COMMON_PTHREAD SCOTCH_PTHREAD)
- target_link_libraries(scotch PUBLIC Threads::Threads)
+ target_link_libraries(scotch PUBLIC Threads::Threads ${THREADS_PTHREADS_WIN32_LIBRARY})
endif(Threads_FOUND)

# Include files
@@ -771,7 +779,7 @@ if(BUILD_PTSCOTCH)

if(Threads_FOUND)
target_compile_definitions(ptscotch PUBLIC SCOTCH_PTHREAD COMMON_PTHREAD)
- target_link_libraries(ptscotch PUBLIC Threads::Threads)
+ target_link_libraries(ptscotch PUBLIC Threads::Threads ${THREADS_PTHREADS_WIN32_LIBRARY})
endif(Threads_FOUND)

add_library(ptscotcherr library_error.c)
diff --git a/src/scotch/CMakeLists.txt b/src/scotch/CMakeLists.txt
index 3974f4f..94c0080 100644
--- a/src/scotch/CMakeLists.txt
+++ b/src/scotch/CMakeLists.txt
@@ -69,7 +69,7 @@ function(add_scotch_exe)
target_compile_definitions(${file_we} PUBLIC "SCOTCH_CODENAME=\"${SCOTCH_CODENAME}\"")
if(Threads_FOUND)
target_compile_definitions(${file_we} PUBLIC SCOTCH_PTHREAD COMMON_PTHREAD)
- target_link_libraries(${file_we} PUBLIC Threads::Threads)
+ target_link_libraries(${file_we} PUBLIC Threads::Threads ${THREADS_PTHREADS_WIN32_LIBRARY})
endif(Threads_FOUND)
target_link_libraries(${file_we} PUBLIC scotch scotcherrexit)
endfunction(add_scotch_exe)
@@ -144,7 +146,7 @@ if(BUILD_PTSCOTCH)
target_compile_definitions(${file_we} PUBLIC "SCOTCH_CODENAME=\"${SCOTCH_CODENAME}\"")
if(Threads_FOUND)
target_compile_definitions(${file_we} PUBLIC SCOTCH_PTHREAD COMMON_PTHREAD)
- target_link_libraries(${file_we} PUBLIC Threads::Threads)
+ target_link_libraries(${file_we} PUBLIC Threads::Threads ${THREADS_PTHREADS_WIN32_LIBRARY})
endif(Threads_FOUND)
target_include_directories(${file_we} PRIVATE ${GENERATED_INCLUDE_DIR})
target_link_libraries(${file_we} PUBLIC scotch ptscotch ptscotcherrexit)
Loading