installation problem

953 views
Skip to first unread message

Tatiana Aghova

unread,
Apr 28, 2022, 2:31:10 PM4/28/22
to Stacks
Dear all,
I am new with STACKS, so probably this question will be very easy...(sorry, but I didn't find solution in previous conversations)...

I am installing STACKS 2.61..I am going according manual
./configure
make
make install

....but I get error and I have no clue what I can do or change...but I wish STACKS will work for me too :)

Could you help we what is wrong?
Thank you in advance! :)
Cheers,
Tatiana

here is my error
AiruzivTatiana2:stacks-2.61 tatianaaghova$ make install

Making install in htslib

make[2]: Nothing to be done for `install-exec-am'.

make[2]: Nothing to be done for `install-data-am'.

depbase=`echo src/process_radtags.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\

   g++ -std=gnu++11 -DHAVE_CONFIG_H -I.   -I./htslib   -g -O2 -MT src/process_radtags.o -MD -MP -MF $depbase.Tpo -c -o src/process_radtags.o src/process_radtags.cc &&\

   mv -f $depbase.Tpo $depbase.Po

src/process_radtags.cc:701:5: error: unknown type name 'omp_lock_t'

    omp_lock_t inpbuf_lock[num_worker_threads];

    ^

src/process_radtags.cc:702:5: error: unknown type name 'omp_lock_t'

    omp_lock_t outbuf_lock[num_worker_threads];

    ^

src/process_radtags.cc:754:18: error: use of undeclared identifier 'omp_get_thread_num'

        int thread_no = omp_get_thread_num();

                        ^

src/process_radtags.cc:935:6: error: unknown type name 'omp_lock_t'

            omp_lock_t                &thread_inpbuf_lock   = inpbuf_lock[thread_index];

            ^

src/process_radtags.cc:937:6: error: unknown type name 'omp_lock_t'

            omp_lock_t                &thread_outbuf_lock   = outbuf_lock[thread_index];

            ^

src/process_radtags.cc:1282:5: error: unknown type name 'omp_lock_t'

    omp_lock_t inpbuf_lock[num_worker_threads];

    ^

src/process_radtags.cc:1283:5: error: unknown type name 'omp_lock_t'

    omp_lock_t outbuf_lock[num_worker_threads];

    ^

src/process_radtags.cc:1332:18: error: use of undeclared identifier 'omp_get_thread_num'

        int thread_no = omp_get_thread_num();

                        ^

src/process_radtags.cc:1476:6: error: unknown type name 'omp_lock_t'

            omp_lock_t      &thread_inpbuf_lock   = inpbuf_lock[thread_index];

            ^

src/process_radtags.cc:1478:6: error: unknown type name 'omp_lock_t'

            omp_lock_t      &thread_outbuf_lock   = outbuf_lock[thread_index];

            ^

10 errors generated.

make[1]: *** [src/process_radtags.o] Error 1

make: *** [install-recursive] Error 1

Alicia Toon

unread,
Apr 28, 2022, 10:57:07 PM4/28/22
to Stacks
I'm having the same problem with installation STACKS 2.61 (same errors are reported) and haven't found a solution either. Not sure if it's helpful but I'm installing on an apple m1. 

Thanks,
Alicia

Catchen, Julian

unread,
Apr 29, 2022, 4:02:34 AM4/29/22
to stacks...@googlegroups.com

Hi Alicia,

 

Stacks is not tested on Apple’s compiler for M1. It needs the OpenMP libraries for multi-threading, which I thought had been added to the Clang compiler that Apple used previously (at least on the Intel chips), but as I said, I haven’t yet looked at what is needed for the new M1 chips. The errors you list below are all openmp directives that the compiler doesn’t understand.

 

Previously, people who installed Stacks on a Mac typically would install the GCC compiler first and use that (which has openmp support built in). Stacks will build on the default Linux environment as well.

 

Best,

 

julian

--
Stacks website: http://catchenlab.life.illinois.edu/stacks/
---
You received this message because you are subscribed to the Google Groups "Stacks" group.
To unsubscribe from this group and stop receiving emails from it, send an email to stacks-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/stacks-users/d16373a7-2a9c-4797-8df1-16849abf1c81n%40googlegroups.com.

Alicia Toon

unread,
Apr 29, 2022, 7:42:48 AM4/29/22
to Stacks
Hi Julian,

Yes that worked, thanks.

What I did:
Installed the GCC compiler with homebrew and then made a link between the gcc version and gcc. This worked - no more errors.

brew install gcc
cd /opt/homebrew/bin
ln -s gcc-11 gcc
ln -s g++-11 g++

And then the regular stacks install and exported the stacks folder to PATH variable. 

export PATH=/Applications/stacks-2.61:$PATH


Thanks,

Alicia



James Clugston

unread,
Sep 20, 2022, 9:38:25 AM9/20/22
to Stacks
Sorry to bring up an old topic. 

But I am also having some issues with the install on MacOS 12.6 on Apple M1. 

I followed Alicia's advice and got Gcc working. However, I am running version 12 of Gcc and I am having an issue trying to compile the package.

I get the following message; 

g++  -g -O2 -fopenmp  -o gstacks src/gstacks.o src/debruijn.o src/SuffixTree.o htslib/libhts.a libcore.a -lz -lgomp 

0  0x102c501a0  __assert_rtn + 140

1  0x102ad7a8c  mach_o::relocatable::Parser<arm64>::parse(mach_o::relocatable::ParserOptions const&) + 4536

2  0x102aa9d38  mach_o::relocatable::Parser<arm64>::parse(unsigned char const*, unsigned long long, char const*, long, ld::File::Ordinal, mach_o::relocatable::ParserOptions const&) + 148

3  0x102af4180  archive::File<arm64>::makeObjectFileForMember(archive::File<arm64>::Entry const*) const + 1084

4  0x102af3ac8  archive::File<arm64>::File(unsigned char const*, unsigned long long, char const*, long, ld::File::Ordinal, archive::ParserOptions const&) + 856

5  0x102aec02c  archive::parse(unsigned char const*, unsigned long long, char const*, long, ld::File::Ordinal, archive::ParserOptions const&) + 388

6  0x102b126d0  ld::tool::InputFiles::makeFile(Options::FileInfo const&, bool) + 2016

7  0x102b15360  ___ZN2ld4tool10InputFilesC2ER7Options_block_invoke + 56

8  0x19a2fc1f4  _dispatch_client_callout2 + 20

9  0x19a30f954  _dispatch_apply_invoke + 224

10  0x19a2fc1b4  _dispatch_client_callout + 20

11  0x19a30da04  _dispatch_root_queue_drain + 680

12  0x19a30e104  _dispatch_worker_thread2 + 164

13  0x19a4bc324  _pthread_wqthread + 228

A linker snapshot was created at:

   /tmp/gstacks-2022-09-20-212131.ld-snapshot

ld: Assertion failed: (_file->_atomsArrayCount == computedAtomCount && "more atoms allocated than expected"), function parse, file macho_relocatable_file.cpp, line 2061.

collect2: error: ld returned 1 exit status

make[2]: *** [gstacks] Error 1

make[2]: Target `all-am' not remade because of errors.

make[1]: *** [all-recursive] Error 1

make: *** [all] Error 2

Any ideas on how to fix this? it seems I am getting some errors at the end of the make command. 

Regards James   

Chris Blom

unread,
Nov 18, 2022, 2:33:38 PM11/18/22
to Stacks
I've had succes with a variation of the steps alicia posted:

# install gcc
brew install gcc

This installs gcc under /opt/local/bin/gcc-12 and /opt/local/bin/g++-12, but
stacks used gcc and g++ (without the ..-12)

I had to ensure that 'gcc' and 'g++'  refer to the versions installed by brew:

# alias the commands without the ..-12 suffix:
cd /opt/local/bin
ln -s gcc-12 gcc
ln -s g++-12 g++

# make sure gcc and g++ in /opt/local/bin have preference over those in /usr/bin
export PATH=/opt/local/bin:$PATH

You can test if the right version of gcc is picked up by running

gcc --version

It should display
gcc (Homebrew GCC 12.2.0) 12.2.0

g++ --version
should display
g++ (Homebrew GCC 12.2.0) 12.2.0

If the output contains clang or apple the wrong version of gcc/g++ is picked up.

Once gcc and g++ were setup correctly, i could install stacks with

cd /dir/where/stacks/was/unpacked
./configure
make
sudo make install

James Clugston

unread,
Nov 19, 2022, 11:19:34 PM11/19/22
to stacks...@googlegroups.com
Hi Chirs, 

That actually worked for me thank you! 

I think the issues might have been that I was using the ARM64 build of miniconda which has been giving me so many issues and I am not sure it it is that much faster then the x86_64 build. 

James 

You received this message because you are subscribed to a topic in the Google Groups "Stacks" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/stacks-users/QTPVpWeF5Vo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to stacks-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/stacks-users/79e672e2-e028-480e-b2f6-8c982680d5fbn%40googlegroups.com.

amy....@mail.wvu.edu

unread,
Aug 23, 2023, 11:15:45 AM8/23/23
to Stacks
Hello,

I'm trying to install the newest version of STACKS and am running into the same errors that a previous user on this thread encountered.  I'm running on a Mac (OS Monterey version 12.1).  I tried the suggestion on this thread (make sure the Homebrew version of gcc is being used... in my case, that's version 13).  However, I'm getting the following error after running the make command:

ld: symbol(s) not found for architecture x86_64

collect2: error: ld returned 1 exit status

make[2]: *** [process_radtags] Error 1

make[1]: *** [all-recursive] Error 1

make: *** [all] Error 2


Thanks,

Amy


Reply all
Reply to author
Forward
0 new messages