From 16b4863a186bb0e396d785aab6ac3318fd69b196 Mon Sep 17 00:00:00 2001 From: Chris Piker Date: Mon, 6 Nov 2023 00:29:32 -0600 Subject: [PATCH 1/4] Updates conda build for Windows --- buildfiles/Windows.mak | 2 +- buildfiles/conda/README.md | 21 ++++++++++----------- buildfiles/conda/bld.bat | 2 +- INSTALL.txt => notes/install.txt | 0 4 files changed, 12 insertions(+), 13 deletions(-) rename INSTALL.txt => notes/install.txt (100%) diff --git a/buildfiles/Windows.mak b/buildfiles/Windows.mak index 05d6221..ad6f9c0 100644 --- a/buildfiles/Windows.mak +++ b/buildfiles/Windows.mak @@ -18,7 +18,7 @@ CFLAGS=$(CFLAGS) /DEBUG /DWISDOM_FILE=C:/ProgramData/fftw3/wisdom.dat $(INC) ED=$(LIBRARY_LIB) !if defined(CONDA_BUILD_STATE) EXPAT_LIB=$(ED)\libexpat.lib -INSTALL_PREFIX:=$(PREFIX) +INSTALL_PREFIX=$(PREFIX) !else EXPAT_LIB=$(ED)\libexpatMD.lib !endif diff --git a/buildfiles/conda/README.md b/buildfiles/conda/README.md index b0fd0d9..3e8845f 100644 --- a/buildfiles/conda/README.md +++ b/buildfiles/conda/README.md @@ -38,22 +38,21 @@ CONDA_BUILD_SYSROOT: ## Windows Notes -Before building anything for Windows you'll need a compiler. Microsoft makes -this more difficult to setup then any other operating system I normally work with. +Before building anything for Windows you'll need a compiler. Microsoft makes this +more difficult to setup then any other operating system I normally work with. Not +only will you need a copy of visual studio, you need the **particular version** of +visual studio that `conda build` looks for. The following link has +worked for me for miniconda3.9: -In the \notes directory of this repository you'll find a file named: - [install_visual_studio.txt](https://github.com/das-developers/das2C/blob/master/notes/install_visual_studio.txt) -Follow along there until you can run: -``` - \opt\vs\2022\buildtools\Common7\Tools\VsDevCmd.bat -``` -You'll need to invoke this command **after** entering the conda environment. Once -this is issued, move on to creating the pthreads4u and then the das2C packages. +(VS Build Tools 2015)[https://download.visualstudio.microsoft.com/download/pr/3e542575-929e-4297-b6c6-bef34d0ee648/639c868e1219c651793aff537a1d3b77/vs_buildtools.exe] + +Install this before proceeding. Das2C is built to be multi-thread safe. Thread safety is built around the POSIX threads library, which is native to Linux and MacOS. On Windows a wrapper library must be used instead. Before building das2C packages you'll -need to build pthreads4w (POSIX Threads for Windows). To do so: +need to build [pthreads4w](https://sourceforge.net/projects/pthreads4w/) +(POSIX Threads for Windows). To do so: ```dos cd das2C\buildfiles diff --git a/buildfiles/conda/bld.bat b/buildfiles/conda/bld.bat index 3486b09..9665ee9 100644 --- a/buildfiles/conda/bld.bat +++ b/buildfiles/conda/bld.bat @@ -1,4 +1,4 @@ -set N_ARCH=/ +set N_ARCH=\ nmake.exe /nologo /f buildfiles\Windows.mak clean diff --git a/INSTALL.txt b/notes/install.txt similarity index 100% rename from INSTALL.txt rename to notes/install.txt From 1bf5b27a28be6eb684bfdab550997ec67801887c Mon Sep 17 00:00:00 2001 From: Chris Piker Date: Mon, 6 Nov 2023 01:32:24 -0600 Subject: [PATCH 2/4] Update common MacOS-intel directories --- buildfiles/Darwin.mak | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/buildfiles/Darwin.mak b/buildfiles/Darwin.mak index 914bd1f..8c93142 100644 --- a/buildfiles/Darwin.mak +++ b/buildfiles/Darwin.mak @@ -1,8 +1,7 @@ # Export mac compatable md5sum command -MD5SUM=md5 -r -export MD5SUM - +export MD5SUM := md5 -r +export DIFFCMD := diff ############################################################################## # Project definitions @@ -52,12 +51,12 @@ WARNINGS:=-Wall -Wno-format-security -Wno-format-truncation ifeq ($(CONDA_BUILD_STATE),) # Non conda build, depends on homebrew -BREW_INC_DIR=/opt/homebrew/include -BREW_LIB_DIR=/opt/homebrew/lib +BREW_INC_DIR=/usr/local/include +BREW_LIB_DIR=/usr/local/lib ifeq ($(OPENSSL_DIR),) -OPENSSL_DIR=/opt/homebrew/opt/openssl +OPENSSL_DIR=/usr/local/opt/openssl endif SSL_INC=-I $(OPENSSL_DIR)/include @@ -73,8 +72,6 @@ LFLAGS= -L$(BREW_LIB_DIR) -lfftw3 -lexpat $(SSL_LIB) -lz -lm -lpthread else # Conda build -$(error wtf?) - SSL_INC= SSL_LIB=-lssl -lcrypto @@ -86,8 +83,6 @@ LFLAGS:=$(LDFLAGS) -lfftw3 -lexpat $(SSL_LIB) -lz -lm -lpthread endif - - ############################################################################## # Derived definitions From 8b315548fd6a45127f769d0870dac60125603fc5 Mon Sep 17 00:00:00 2001 From: Chris Piker Date: Mon, 6 Nov 2023 01:48:13 -0600 Subject: [PATCH 3/4] Updated versions in RPM spec --- buildfiles/rpm/das2C.spec | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/buildfiles/rpm/das2C.spec b/buildfiles/rpm/das2C.spec index c17390e..af2bc66 100644 --- a/buildfiles/rpm/das2C.spec +++ b/buildfiles/rpm/das2C.spec @@ -1,6 +1,6 @@ Name: das2C -Version: 2.3 -%global tagver 2.3 +Version: 2.3.0 +%global tagver 2.3.0 Release: 1%{?dist} Summary: das2 stream utilities and catalog client in C @@ -88,6 +88,7 @@ rm -rf $RPM_BUILD_ROOT %{_bindir}/das2_histo %{_bindir}/das2_prtime %{_bindir}/das2_psd +%{_bindir}/das_node %{_libdir}/*.so %files devel @@ -97,5 +98,6 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Sun Nov 06 2023 Chris Piker - 2.3.0 * Sun Nov 28 2021 Chris Piker - 2.3-pre4 - First das2C package From 2fa16123a63d25c846db85725da5661f62f63a23 Mon Sep 17 00:00:00 2001 From: Chris Piker Date: Mon, 6 Nov 2023 02:07:52 -0600 Subject: [PATCH 4/4] Updated hash for conda builds --- buildfiles/conda/meta.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildfiles/conda/meta.yaml b/buildfiles/conda/meta.yaml index 9658498..6d0dbab 100644 --- a/buildfiles/conda/meta.yaml +++ b/buildfiles/conda/meta.yaml @@ -8,7 +8,7 @@ {% set name = "das2c" %} {% set conda_version = "2.3.0" %} {% set git_version = "2.3.0" %} -{% set sha256 = "1148520e3ae9a193c478d9dd6d001b1222d976d99adf975e7feb6f9b2eedef6c" %} +{% set sha256 = "92d3472766d683f164b6df4b2955a4c15a3170f7f751462c4937eab1fae1f0dd" %} package: name: {{ name }}