Giter Site home page Giter Site logo

Comments (12)

tseemann avatar tseemann commented on July 29, 2024 1

Next one is:

gcc -g3 -W -Wall -Wno-unused-but-set-variable -O4 -DTIMESTAMP="Thu Oct 25 23:58:01 PDT 2018" -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -mpopcnt -msse4.2 -o wtpoa-cns wtpoa-cns.c ksw.c -lm -lrt -lpthread
kbm.c:244:10: error: use of undeclared identifier '_proc_deamon'; did you mean '_sig_proc_deamon'?
                ncpu = _proc_deamon->ncpu;
                       ^~~~~~~~~~~~
                       _sig_proc_deamon
./mem_share.h:570:36: note: '_sig_proc_deamon' declared here
static struct _proc_deamon_struct* _sig_proc_deamon = NULL;
                                   ^
1 error generated.

from wtdbg2.

ruanjue avatar ruanjue commented on July 29, 2024 1

wtdbg2 will support Mac OS in future, but not sure of how soon.

from wtdbg2.

GGBio avatar GGBio commented on July 29, 2024 1

Hi ruanjue, looks like an awesome tool. I would love to use it but don't have access to any Linux systems. Any idea when the MacOS release might be out?

I tried to compile with 'make' and got this error if this helps (MacOS 10.14.1):

gcc -g3 -W -Wall -Wno-unused-but-set-variable -O4 -DTIMESTAMP="Mon 4 Feb 2019 09:27:14 GMT" -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -mpopcnt -msse4.2 -o kbm2 kbm.c ksw.c -lm -lrt -lpthread -lz
clang: warning: -O4 is equivalent to -O3 [-Wdeprecated]
clang: warning: -O4 is equivalent to -O3 [-Wdeprecated]
warning: unknown warning option
'-Wno-unused-but-set-variable'; did you mean
'-Wno-unused-const-variable'?
[-Wunknown-warning-option]
In file included from kbm.c:20:
In file included from ./kbm.h:23:
In file included from ./list.h:28:
./mem_share.h:289:13: warning: implicit declaration of
function 'canonicalize_file_name' is invalid in C99
[-Wimplicit-function-declaration]
realpath = canonicalize_file_name(filename);
^
./mem_share.h:289:11: warning: incompatible integer to
pointer conversion assigning to 'char *' from 'int'
[-Wint-conversion]
realpath = canonicalize_file_name(filename);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./mem_share.h:308:13: warning: implicit declaration of
function 'canonicalize_file_name' is invalid in C99
[-Wimplicit-function-declaration]
realpath = canonicalize_file_name(filename);
^
./mem_share.h:308:11: warning: incompatible integer to
pointer conversion assigning to 'char ' from 'int'
[-Wint-conversion]
realpath = canonicalize_file_name(filename);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from kbm.c:20:
In file included from ./kbm.h:25:
./dna.h:488:122: warning: explicitly assigning value of
variable of type 'int' to itself [-Wself-assign]
...+ 31) / 32 + 1) * 8; idx = idx; }
~~~ ^ ~~~
In file included from kbm.c:20:
In file included from ./kbm.h:26:
In file included from ./filereader.h:30:
./chararray.h:65:6: warning: explicitly assigning value of
variable of type 'int' to itself [-Wself-assign]
idx = idx;
~~~ ^ ~~~
In file included from kbm.c:20:
In file included from ./kbm.h:28:
./bitsvec.h:92:6: warning: explicitly assigning value of
variable of type 'int' to itself [-Wself-assign]
idx = idx;
~~~ ^ ~~~
In file included from kbm.c:20:
In file included from ./kbm.h:29:
./bit2vec.h:46:6: warning: explicitly assigning value of
variable of type 'int' to itself [-Wself-assign]
idx = idx;
~~~ ^ ~~~
In file included from kbm.c:21:
In file included from ./kbmpoa.h:24:
In file included from ./wtpoa.h:23:
In file included from ./tripoa.h:23:
./poacns.h:34:9: warning: ** ./poacns.h hasn't been tested
in BIG_ENDIAN ** [-W#pragma-messages]
#pragma message(" ** " FILE " hasn't been tested ...
^
kbm.c:264:10: error: use of undeclared identifier
'_proc_deamon'; did you mean '_sig_proc_deamon'?
ncpu = _proc_deamon->ncpu;
^~~~~~~~~~~~
_sig_proc_deamon
./mem_share.h:585:36: note: '_sig_proc_deamon' declared here
static struct _proc_deamon_struct
_sig_proc_deamon = NULL;
^
10 warnings and 1 error generated.
warning: unknown warning option
'-Wno-unused-but-set-variable'; did you mean
'-Wno-unused-const-variable'?
[-Wunknown-warning-option]
1 warning generated.
make: *** [kbm2] Error 1

from wtdbg2.

takaho avatar takaho commented on July 29, 2024 1

I thought the trouble in Mac was caused by old version of GCC. Xcode installs GCC4 in Mac but many Linux has newer versions.
Easy option to use newer version of GCC is using Homebrew (https://brew.sh/ and 'brew upgrade').
When GCC-8 is installed at your local environment, the following modification on Makefile could help you build the application.
In addition to upgrade of GCC, some modification were required to build without errors. Therefore I forked the repository and uploaded my changes at https://github.com/takaho/wtbg2-mac

from wtdbg2.

tseemann avatar tseemann commented on July 29, 2024

It appears the fix is not too difficult:

<endian.h> is <machine/endian.h> on MacOS

only occurs in ./mem_share.h

Source: https://stackoverflow.com/questions/20813028/endian-h-not-found-on-mac-osx

from wtdbg2.

ruanjue avatar ruanjue commented on July 29, 2024

Thanks! Have a try with 6e301b4.

Also solved #28 #29 #30

from wtdbg2.

ruanjue avatar ruanjue commented on July 29, 2024

BTW, I have never compiled or tested wtdbg on Mac OS, I can imagine lots of problems to use wtdbg2 on Mac.

from wtdbg2.

tseemann avatar tseemann commented on July 29, 2024

I think I might need to make the brew recipe "Linux only" for now.

from wtdbg2.

ruanjue avatar ruanjue commented on July 29, 2024

I agree.

from wtdbg2.

tseemann avatar tseemann commented on July 29, 2024

Which is a bit ironic, as with this tool, you can now assemble your pacbio/nanopore genomes on a Mac laptop :)

from wtdbg2.

jflot avatar jflot commented on July 29, 2024

I tried the OSX version available on https://github.com/takaho/wtbg2-mac, it compiles well but it fails with error message -- REGCOMP: repetition-o -- right after loading reads. I have a feeling that it may be due to the behavior of regcomp() being different in BSD vs. GNU (see e.g. https://web.mit.edu/gnu/doc/html/regex_7.html). In that case, a small change to the code could be sufficient to make the regex lines compatible with both BSD and GNU, but I do not have the expertise to try and make the necessary change...

from wtdbg2.

jflot avatar jflot commented on July 29, 2024

After tweaking the code so that it outputs the complete error message instead of just the first 13 characters, it turns out that the error message is -- REGCOMP: repetition-operator operand invalid --. This is actually due to the combination of the "lazy" operator ? with + (+?) being not POSIX-compliant, so it cannot be used on BSD/MacOS. As a quick fix I replaced +? with *, hence the regex became ^(.*)/[0-9]+_[0-9]+$ instead of ^(.+?)/[0-9]+_[0-9]+$. This is not exactly the same thing but it seems to be working now. However, for some reason I can only run wtdbg2 on MacOS with a single thread: as soon as I run wtdbg2 with more than one thread I get a malloc: double free for ptr 0x7fa938ec8800 error and the program crashes. You can try it here: https://github.com/jflot/wtdbg2-mac.

from wtdbg2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.