Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

smartdenovo make error #18

Closed
liguiyang410 opened this issue May 1, 2018 · 8 comments
Closed

smartdenovo make error #18

liguiyang410 opened this issue May 1, 2018 · 8 comments

Comments

@liguiyang410
Copy link

when make in fold smartdenovo, errors were showed as follows:
/tmp/ccTfg5aF.o: In function merge_bubbles_strgraph': wtlay.c:(.text+0x984d): undefined reference to cut_biedge_strgraph2'
wtlay.c:(.text+0x9861): undefined reference to cut_biedge_strgraph2' wtlay.c:(.text+0x992d): undefined reference to cut_biedge_strgraph2'
wtlay.c:(.text+0x994a): undefined reference to `cut_biedge_strgraph2'
collect2: error: ld returned 1 exit status
Makefile:48: recipe for target 'wtlay' failed
make: *** [wtlay] Error 1

@ruanjue
Copy link
Owner

ruanjue commented May 1, 2018

Please tell me your gcc version. Try to modify

$(CC) $(CFLAGS) -o wtlay file_reader.c wtlay.c $(GLIBS)
into $(CC) $(CFLAGS) -o wtlay file_reader.c wtlay.c wtlay.h $(GLIBS), then make wtlay again.

@liguiyang410
Copy link
Author

GCC 4.8 . I modified the line 48, but still the same errors.

@ruanjue
Copy link
Owner

ruanjue commented May 2, 2018

Let me think that your compiler is not C but C++. Then try to remove

smartdenovo/wtlay.h

Lines 95 to 97 in 5cc1356

#ifdef _CPLUSPLUS
extern "C" {
#endif

smartdenovo/wtlay.h

Lines 832 to 834 in 5cc1356

#ifdef _CPLUSPLUS
}
#endif

and compile wtlay again.

@ruanjue
Copy link
Owner

ruanjue commented May 2, 2018

If there is still error, also try to remove the modifier inline in

smartdenovo/wtlay.h

Lines 491 to 518 in 5cc1356

inline int cut_edge_strgraph(StringGraph *g, uint32_t node_id, int dir, uint32_t eidx){
sg_edge_t *e;
e = edge_strgraph(g, node_id, dir, eidx);
if(e->closed) return 0;
e->closed = 1;
return 1;
}
inline sg_edge_t* edge_partner_strgraph(StringGraph *g, uint32_t node_id, int dir, uint32_t eidx){
sg_edge_t *e1, *e2;
e1 = edge_strgraph(g, node_id, dir, eidx);
e2 = edge_strgraph(g, e1->node_id, !e1->dir, e1->rev_idx);
return e2;
}
inline int cut_biedge_strgraph_core(StringGraph *g, uint32_t node_id, int dir, uint32_t eidx, int closed){
edge_strgraph(g, node_id, dir, eidx)->closed = closed;
edge_partner_strgraph(g, node_id, dir, eidx)->closed = closed;
return 1;
}
inline int cut_biedge_strgraph(StringGraph *g, uint32_t node_id, int dir, uint32_t eidx){
return cut_biedge_strgraph_core(g, node_id, dir, eidx, 1);
}
inline int cut_biedge_strgraph2(StringGraph *g, uint32_t node_id, int dir, uint32_t eidx){
return cut_biedge_strgraph_core(g, node_id, dir, eidx, 2);
}

@emaleckova
Copy link

emaleckova commented Feb 8, 2020

I also had trouble installing SMARTdenovo, similar to those described here as well as in issue #22. Since it took me several tries to install successfully, I would like to share what helped in my case:

  1. Changes in the Makefile as mentioned here
  2. Removing lines 95 to 97 and 832 to 834 in wtlay.h as mentioned here
  3. Add static before all five occurrences of inline (lines 491 to 518) in wtlay.h

For completeness, I work on Ubuntu 19.04 and run gcc 8.3.0.

@ruanjue
Copy link
Owner

ruanjue commented Feb 9, 2020

Thanks!

@miltongr21
Copy link

@emaleckova

This solved the problem for me!
Thanks bro!

@cfz1998
Copy link

cfz1998 commented Apr 23, 2023

I also had trouble installing SMARTdenovo, similar to those described here as well as in issue #22. Since it took me several tries to install successfully, I would like to share what helped in my case:

  1. Changes in the Makefile as mentioned here
  2. Removing lines 95 to 97 and 832 to 834 in wtlay.h as mentioned here
  3. Add static before all five occurrences of inline (lines 491 to 518) in wtlay.h

For completeness, I work on Ubuntu 19.04 and run gcc 8.3.0.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants