Installing PEAR on Ubuntu 22.04

232 views
Skip to first unread message

Walter Rosa

unread,
Sep 12, 2023, 8:48:19 PM9/12/23
to pear-users
When running PEAR, the error returns, what could it be?

sudo make install

Making install in src

make[1]: Entrando no diretório '/home/lgbio/programas/PEAR/src'

gcc -O3 -fomit-frame-pointer -funroll-loops -Wall -Wredundant-decls  -Wreturn-type  -Wswitch-default -Wimplicit  -Wimplicit-function-declaration  -Wimplicit-int -Wimport -Wunused-label -Wno-int-to-pointer-cast -Wbad-function-cast  -Wmissing-declarations -Wmissing-prototypes  -Wnested-externs  -Wold-style-definition -Wstrict-prototypes -Wpointer-sign -Wextra -Wredundant-decls -Wunused -Wunused-function -Wunused-parameter -Wunused-value  -Wunused-variable -Wformat  -Wformat-nonliteral -Wparentheses -Wsequence-point -Wuninitialized -Wundef -g -O2   -o pear pear-pear-pt.o pear-args.o pear-statistics.o pear-reader.o  -lpthread -lm 

/usr/bin/ld: pear-pear-pt.o: na função "assembly_ef":

/home/lgbio/programas/PEAR/src/pear-pt.c:1715: referência não definida para "assembly_REVERSE_LONGER"

/usr/bin/ld: /home/lgbio/programas/PEAR/src/pear-pt.c:1704: referência não definida para "assembly_FORWARD_LONGER"

/usr/bin/ld: /home/lgbio/programas/PEAR/src/pear-pt.c:1710: referência não definida para "assembly_READS_EQUAL"

/usr/bin/ld: pear-pear-pt.o: na função "entry_point":

/home/lgbio/programas/PEAR/src/pear-pt.c:2485: referência não definida para "assembly"

collect2: error: ld returned 1 exit status

make[1]: *** [Makefile:229: pear] Erro 1

make[1]: Saindo do diretório '/home/lgbio/programas/PEAR/src'

make: *** [Makefile:253: install-recursive] Erro 1

Андрей Сандлер

unread,
Jun 28, 2024, 12:36:31 PM6/28/24
to pear-users
Hi, I was facing the same error, and was able to fix it by removing the INLINE keyword from function signatures. Following is the git diff that fixes the problem:

diff --git a/src/pear-pt.c b/src/pear-pt.c
index 90ccf50..1bcf654 100644
--- a/src/pear-pt.c
+++ b/src/pear-pt.c
@@ -1028,7 +1028,7 @@ scoring_nm (char dleft, char dright, char qleft, char qright, int score_method,
    }
 }
 
-INLINE int
+int
 assembly_FORWARD_LONGER (fastqRead * forward, fastqRead * reverse, struct emp_freq * ef, struct user_args  * sw, int nForward, int nReverse)
 {
   int
@@ -1266,7 +1266,7 @@ assembly_FORWARD_LONGER (fastqRead * forward, fastqRead * reverse, struct emp_fr
 
 }
 
-INLINE int
+int
 assembly_READS_EQUAL (fastqRead * forward, fastqRead * reverse, struct emp_freq * ef, struct user_args  * sw, int n)
 {
   int
@@ -1452,7 +1452,7 @@ assembly_READS_EQUAL (fastqRead * forward, fastqRead * reverse, struct emp_freq
 
 }
 
-INLINE int
+int
 assembly_REVERSE_LONGER (fastqRead * forward, fastqRead * reverse, struct emp_freq * ef, struct user_args  * sw, int nForward, int nReverse)
 {
   int
@@ -1718,7 +1718,7 @@ assembly_ef (fastqRead * forward, fastqRead * reverse, struct emp_freq * ef, str
   return (rc);
 }
 
-INLINE int
+int
 assembly (fastqRead * left, fastqRead * right, struct user_args  * sw)
 {
   int                   i,j;
diff --git a/src/reader.c b/src/reader.c
index 8d59716..0a1750f 100644
--- a/src/reader.c
+++ b/src/reader.c
@@ -340,7 +340,7 @@ destroy_reader (void)
 
 /* Parse a block to a reads struct and return a pointer to the last unprocessed
    read, if such one exists */
-INLINE unsigned long
+unsigned long
 parse_block (memBlock * block)
 {
   int
среда, 13 сентября 2023 г. в 03:48:19 UTC+3, Walter Rosa:
Reply all
Reply to author
Forward
0 new messages