primer3-org / primer3

Primer3 is a command line tool to select primers for polymerase chain reaction (PCR).
GNU General Public License v2.0
219 stars 63 forks source link

Patch for building 2.4.0 on mac os x #15

Closed nh13 closed 5 years ago

nh13 commented 5 years ago

The error I was getting is as follows:

g++ -c -g -Wall -O2 -std=c++11  -o libprimer3.o libprimer3.cc
libprimer3.cc:52:19: error: expected namespace name
  using namespace __gnu_cxx;
                  ^
1 error generated.
make: *** [libprimer3.o] Error 1

The patch is as follows:

diff --git a/src/libprimer3.cc b/src/libprimer3.cc
index c1b558c..1e4715c 100644
--- a/src/libprimer3.cc
+++ b/src/libprimer3.cc
@@ -47,10 +47,12 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include <ctype.h> /* toupper */
 #include <unordered_map>
 +#ifdef __GLIBCXX__
 namespace std
 {
   using namespace __gnu_cxx;
 }
+#endif
  #include "libprimer3.h"
untergasser commented 5 years ago

Thank you for reporting this feature request. I included it in this version: https://github.com/primer3-org/primer3/commit/f382935091e1e49bcf2ce8afe8d4d034776509a1 Be aware that the primer3_config folder is not required any more - if you did not modify the default values in this folder. You must also leave out the tag PRIMER_THERMODYNAMIC_PARAMETERS_PATH to use the build in parameters. As the folder is not required any more, it is also omitted in the install. I assume bioconda should work now without any patches.

Best, Andreas