Biostar Beta. Not for public use.
Question: install Primer3 on Ubuntu
1
Entering edit mode

Dear all,

I am trying to install Primer3 on an Ubuntu machine. Following the instructions, I moved into primer3-<release>/src and typed make all but i got:

/usr/local/lib/primer3/src$ make all
g++ -c -g -Wall -D__USE_FIXED_PROTOTYPES__ -O2  primer3_boulder_main.c
g++ -c -g -Wall -D__USE_FIXED_PROTOTYPES__ -O2  -o format_output.o format_output.c
g++ -c -g -Wall -D__USE_FIXED_PROTOTYPES__ -O2  -o read_boulder.o read_boulder.c
g++ -c -g -Wall -D__USE_FIXED_PROTOTYPES__ -O2  -o print_boulder.o print_boulder.c
g++ -c -g -Wall -D__USE_FIXED_PROTOTYPES__ -O2 -Wno-deprecated  -o libprimer3.o libprimer3.c
g++ -c -g -Wall -D__USE_FIXED_PROTOTYPES__ -O2 -o p3_seq_lib.o p3_seq_lib.c
ar rv libprimer3.a libprimer3.o p3_seq_lib.o
ar: creating libprimer3.a
a - libprimer3.o
a - p3_seq_lib.o
ranlib libprimer3.a
g++ -c -g -Wall -D__USE_FIXED_PROTOTYPES__ -O2  -o dpal_primer.o dpal.c
dpal.c: In function ‘void print_align(const unsigned char*, const unsigned char*, int (*)[1600][3], int, int, const dpal_args*)’:
dpal.c:1036:5: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation]
     for(i=j;i<j+70;i++) fprintf(stderr, "%c",sy[i]); fprintf(stderr,"\n");
     ^~~
dpal.c:1036:54: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’
     for(i=j;i<j+70;i++) fprintf(stderr, "%c",sy[i]); fprintf(stderr,"\n");
                                                      ^~~~~~~
ar rv libdpal.a dpal_primer.o
ar: creating libdpal.a
a - dpal_primer.o
ranlib libdpal.a
g++ -c -g -Wall -D__USE_FIXED_PROTOTYPES__ -O2 -ffloat-store  -o thal_primer.o thal.c
thal.c: In function ‘void thal(const unsigned char*, const unsigned char*, const thal_args*, thal_results*)’:
thal.c:429:16: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    if ('\0' == oligo_f) {
                ^~~~~~~
thal.c:434:16: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    if ('\0' == oligo_r) {
                ^~~~~~~
thal.c: In function ‘void tableStartATS(double, double (*)[5])’:
thal.c:1200:4: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation]
    for (i = 0; i < 5; ++i)
    ^~~
thal.c:1203:6: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’
      atpS[0][3] = atpS[3][0] = atp_value;
      ^~~~
thal.c: In function ‘void tableStartATH(double, double (*)[5])’:
thal.c:1212:4: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation]
    for (i = 0; i < 5; ++i)
    ^~~
thal.c:1216:6: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’
      atpH[0][3] = atpH[3][0] = atp_value;
      ^~~~
Makefile:192: recipe for target 'thal_primer.o' failed
make: *** [thal_primer.o] Error 1

what I did wrong?

thank you

ADD COMMENTlink 23 months ago marongiu.luigi • 380 • updated 13 months ago ricardo3889 • 20
Entering edit mode
0

Have you tried installation using bioconda?

ADD REPLYlink 23 months ago
WouterDeCoster
39k
Entering edit mode
0

works fine here.( ubuntu 16.04 / 32). gcc 5.4.0

$ wget -q -O "primer3-2.4.0.tar.gz" "https://10gbps-io.dl.sourceforge.net/project/primer3/primer3/2.4.0/primer3-2.4.0.tar.gz" && tar xvfz primer3-2.4.0.tar.gz && make -C primer3-2.4.0/src

primer3-2.4.0/
(....)
primer3-2.4.0/test/thal_test.pl
primer3-2.4.0/test/vgrep.pl
make: Entering directory '/home/lindenb/primer3-2.4.0/src'
g++ -c -g -Wall -D__USE_FIXED_PROTOTYPES__ -O2  primer3_boulder_main.c
g++ -c -g -Wall -D__USE_FIXED_PROTOTYPES__ -O2  -o format_output.o format_output.c
g++ -c -g -Wall -D__USE_FIXED_PROTOTYPES__ -O2  -o read_boulder.o read_boulder.c
g++ -c -g -Wall -D__USE_FIXED_PROTOTYPES__ -O2  -o print_boulder.o print_boulder.c
g++ -c -g -Wall -D__USE_FIXED_PROTOTYPES__ -O2  masker.c
g++ -c -g -Wall -D__USE_FIXED_PROTOTYPES__ -O2 -Wno-deprecated  -o libprimer3.o libprimer3.c
g++ -c -g -Wall -D__USE_FIXED_PROTOTYPES__ -O2 -o p3_seq_lib.o p3_seq_lib.c
ar rv libprimer3.a libprimer3.o p3_seq_lib.o
ar: creating libprimer3.a
a - libprimer3.o
a - p3_seq_lib.o
ranlib libprimer3.a
g++ -c -g -Wall -D__USE_FIXED_PROTOTYPES__ -O2  -o dpal_primer.o dpal.c
ar rv libdpal.a dpal_primer.o
ar: creating libdpal.a
a - dpal_primer.o
ranlib libdpal.a
g++ -c -g -Wall -D__USE_FIXED_PROTOTYPES__ -O2 -ffloat-store  -o thal_primer.o thal.c
ar rv libthal.a thal_primer.o
ar: creating libthal.a
a - thal_primer.o
ranlib libthal.a
gcc -g -Wall -D__USE_FIXED_PROTOTYPES__ -O2   -c -o oligotm.o oligotm.c
ar rv liboligotm.a oligotm.o
ar: creating liboligotm.a
a - oligotm.o
ranlib liboligotm.a
ar rv libmasker.a masker.o
ar: creating libmasker.a
a - masker.o
ranlib libmasker.a
g++ -g -o primer3_core primer3_boulder_main.o format_output.o read_boulder.o print_boulder.o masker.o libprimer3.a libdpal.a libthal.a liboligotm.a libmasker.a  -lm
g++ -c -g -Wall -D__USE_FIXED_PROTOTYPES__ -o ntdpal_main.o ntdpal_main.c
g++ -c -g -Wall -D__USE_FIXED_PROTOTYPES__ -O2 -o dpal.o dpal.c
g++ -g -o ntdpal ntdpal_main.o dpal.o
g++ -c -g -Wall -D__USE_FIXED_PROTOTYPES__ -O2 -o thal_main.o thal_main.c
g++ -c -g -Wall -D__USE_FIXED_PROTOTYPES__ -O2 -ffloat-store -o thal.o thal.c
g++ -g -o ntthal thal_main.o thal.o -lm
g++ -g -Wall -D__USE_FIXED_PROTOTYPES__ -O2 -o oligotm oligotm_main.c liboligotm.a  -lm
g++ -g -Wall -D__USE_FIXED_PROTOTYPES__ -O2 -o long_seq_tm_test long_seq_tm_test_main.c oligotm.o  -lm
g++ -g -Wall -D__USE_FIXED_PROTOTYPES__ -O2 -o primer3_masker masker_main.c libprimer3.a libdpal.a libthal.a liboligotm.a libmasker.a  -lm
make: Leaving directory '/home/lindenb/primer3-2.4.0/src'
ADD REPLYlink 23 months ago
Pierre Lindenbaum
120k
Entering edit mode
0

I am on Ubuntu 17.10, still same error

ADD REPLYlink 23 months ago
marongiu.luigi
• 380
Entering edit mode
1
sudo apt-get install primer3
ADD REPLYlink 23 months ago
h.mon
25k
Entering edit mode
0

It says here that it was a bug corrected in the latest version of primer3: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=853621

Are you installing primer3 2.3.7-4 or above?

ADD REPLYlink 23 months ago
Selenocysteine
• 550
Entering edit mode
0

it is 2.3.7

ADD REPLYlink 23 months ago
marongiu.luigi
• 380
Entering edit mode
0

I am having the exact same issue compiling primer3-2.4.0 using gcc 7.3.0 in Ubuntu .

ADD REPLYlink 13 months ago
ricardo3889
• 20
Entering edit mode
0

Have you tried installation using bioconda?

ADD REPLYlink 13 months ago
WouterDeCoster
39k
Entering edit mode
0

Do you conda advocates ever get bored of saying “have you tried conda?”?

What would be useful would be if you said “This works in bioconda because we have invented an unofficial 2.4.1a release that includes a few post-2.4.0 commits from upstream primer3, notably a fix for this thal.c:429 problem. See bioconda PR #10390”.

ADD REPLYlink 13 months ago
John Marshall
♦ 1.5k
Entering edit mode
0

I will often comment on software installation issues by asking "have you tried bioconda", because i) it is likely to solve many issues people encounter and ii) if it doesn't work then we/someone has to look into why bioconda failed here.

So it is meant to both point users to a likely solution and to hear from them if there is anything wrong with the current recipe.

ADD REPLYlink 13 months ago
WouterDeCoster
39k
2
Entering edit mode

I finally was able to install it following the instructions in the github page here https://github.com/primer3-org/primer3

Installing sudo apt-get install -y build-essential g++ cmake git-all

git clone https://github.com/primer3-org/primer3.git primer3

cd primer3/src

make

make test

ADD COMMENTlink 13 months ago ricardo3889 • 20
Entering edit mode
1

This worked because you are now building git HEAD rather than the 2.4.0 release. The thal.c:429 et al errors in the original question were bugs that were fixed in May 2018 but these fixes have not yet appeared in a release.

ADD REPLYlink 13 months ago
John Marshall
♦ 1.5k
Entering edit mode
0

It worked for me! Thanks

ADD REPLYlink 13 months ago
marongiu.luigi
• 380

Login before adding your answer.

Similar Posts
Loading Similar Posts
Powered by the version 2.0