diff --git a/ChangeLog b/ChangeLog index 808d943f..836fcd39 100644 --- a/ChangeLog +++ b/ChangeLog @@ -7,6 +7,7 @@ Version 0.38.0 * If you are using the current generation of Nanopore long read data, we recommend using the --nanopore option, which sets read mapping parameters that speed up the analysis and filters out predictions in error-prone homopolymer repeats of 4 or more bases. + * The MacOSX executable is now universal (should run on both Intel and M1 macs). * Changed how reads that map equally to the reference and new junction get resolved to eliminate junctions that could get assigned high frequencies due to very little evidence, particularly in polymorphism mode. This approach is more conservative and may decrease the diff --git a/DEVELOPER b/DEVELOPER index e2504c72..19e169c3 100644 --- a/DEVELOPER +++ b/DEVELOPER @@ -26,8 +26,8 @@ $ make $ make install A special script exists for building a new breseq release package on the current system. If you are working -on Linux, you can run this directly in this setup. If you are making a MacOSX release, you must also install -universal versions of the libraries using the alternative MacPorts instructions below. +on Linux, you can run this directly in this setup. If you are making a MacOSX release, you must use MacPorts +to install universal versions of the libraries using the alternative instructions below. $./binarydist.sh @@ -43,39 +43,43 @@ $ make test Note that conda installs a compiler in this environment that will interfere with building breseq in this environment, so only use it for the tests or running breseq on your samples! -=== Developing with XCode on MacOSX or Building MacOSX Universal Binaries=== - -Open the included project file: src/c/breseq.xcodeproj +=== Building MacOSX Universal Binaries and Documentation === For compiling a universal binary, breseq needs a universal library (compiled for both arm64 and x86_64). -XCode expects this to be installed in /opt/local/lib. Install MacPorts then use it to install these: +XCode expects this to be installed in /opt/local/lib. +Install MacPorts then use it to install this: $ sudo port install zlib +universal -You need to uninstall the architecture specific version installed by conda: -$ conda activate breseq-dev -$ conda uninstall zlib +If you are building the documentation, you also need sphinx, latex, and some of their extras: +$ sudo port install texlive texlive-latex-extra py311-sphinx py311-sphinxcontrib-jsmath +(Note: installing these through conda doesn't seem to catch all the dependencies as of 2023-04-04.) -You will need to change your breseq-dev conda environment to find these files -$ conda env create -f dev-environment.yml -$ conda activate breseq-dev -$ conda env config vars set CFLAGS="-I/opt/local/include -I${CONDA_PREFIX}/include" -$ conda env config vars set CPPFLAGS="-I/opt/local/include -I${CONDA_PREFIX}/include" -$ conda env config vars set LDFLAGS="-L/opt/local/lib -L${CONDA_PREFIX}/lib" -$ conda activate breseq-dev -$ conda env config vars list +Next, you will need to change your environment to find these library and header files by adding +these lines to your shell config file (Example: ~/.zshrc) + +export CFLAGS="$CFLAGS -I/opt/local/include" +export CPPFLAGS="$CPPFLAGS -I/opt/local/include" +export LDFLAGS="$LDFLAGS -L/opt/local/lib" At this point, you can compile a release with MacOSX universal binaries. $./binarydist.sh +=== Developing with XCode === + +Open the included project file: src/c/breseq.xcodeproj + +For compiling a universal binary, breseq needs a universal library (compiled for both arm64 and x86_64). +XCode expects this to be installed in /opt/local/lib. Install MacPorts then use it to install these: + +$ sudo port install zlib +universal + Before compiling and debugging in in XCode, you need to run the first few commands of the command-line instructions to generate Makefiles for building samtools external libraries. $ ./bootstrap $ ./configure -=== Debugging in XCode === - To run breseq with the XCode debugger, you must set the environmental variable PATH, within the "executable" or "scheme" options, include the locations where you have R and bowtie2 installed. You can find these with the 'which' shell command. Then set up a new Environment Variable within XCode diff --git a/binarydist.sh b/binarydist.sh index 36bbc3a1..abd51ebe 100755 --- a/binarydist.sh +++ b/binarydist.sh @@ -16,6 +16,7 @@ BINARYLOCALDIR=${BRESEQVERSIONSTRING}-${BINARYNAME} BINARYDIR=${PWD}/${BINARYLOCALDIR} rm -rf ${BINARYDIR} ${BINARYDIR}.tgz +echo "${BINARYLOCALDIR}" echo "${BINARYDIR}" echo "./configure --without-libunwind --prefix=\"${BINARYDIR}\" --enable-static CFLAGS=\"${ARCHFLAGS} ${CFLAGS}\" CXXFLAGS=\"${ARCHFLAGS} ${CXXFLAGS}\" LDFLAGS=\"${ARCHFLAGS} ${LDFLAGS}\"" ./configure --without-libunwind --prefix="${BINARYDIR}" --enable-static CFLAGS="${ARCHFLAGS} ${CFLAGS}" CXXFLAGS="${ARCHFLAGS} ${CXXFLAGS}" LDFLAGS="${ARCHFLAGS} ${LDFLAGS}" diff --git a/dev-environment.yml b/dev-environment.yml index 372ac9a3..6c949c55 100644 --- a/dev-environment.yml +++ b/dev-environment.yml @@ -9,6 +9,6 @@ dependencies: - automake - libtool - m4 - - sphinx - - sphinxcontrib-jsmath - - texlive-core + # - sphinx + # - sphinxcontrib-jsmath + # - texlive-core