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

installation issue: error: undefined reference to '__wrap_memcpy' #6

Closed
MichelMoser opened this issue Nov 5, 2020 · 15 comments · Fixed by pangenome/pggb#17
Closed

Comments

@MichelMoser
Copy link

hi,

I am trying to compile edyeet and run into some problems with the --wrap=memcpy option.

install commands:

 module load zlib/1.2.11-GCCcore-8.3.0
 module load Boost/1.71.0-gompi-2019b
 module load GCC/8.3.0
cd edyeet
./bootstrap.sh
 ./configure --prefix=$PWD --with-boost=/cluster/software/Boost/1.71.0-gompi-2019b/
make

output:

checking for g++... g++
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking how to run the C++ preprocessor... g++ -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking zlib.h usability... yes
checking zlib.h presence... yes
checking for zlib.h... yes
checking boost/math/distributions/binomial.hpp usability... yes
checking boost/math/distributions/binomial.hpp presence... yes
checking for boost/math/distributions/binomial.hpp... yes
configure: creating ./config.status
config.status: creating Makefile

#make
g++ -O3 -DNDEBUG -g -std=c++14 -Wno-deprecated-declarations -Isrc -I /cluster/software/Boost/1.71.0-gompi-2019b//include -include src/common/memcpyLink.h -Wl,--wrap=memcpy -DUSE_BOOST src/yeet/yeet_main.cpp -o edyeet /cluster/software/Boost/1.71.0-gompi-2019b//lib/libboost_math_c99.a -lstdc++ -lz -lm -lpthread
/net/10.222.0.31/projects01/Orion/cluster/software/GCCcore/8.3.0/include/c++/8.3.0/bits/stl_algobase.h:368: error: undefined reference to '__wrap_memcpy'
/net/10.222.0.31/projects01/Orion/cluster/software/GCCcore/8.3.0/include/c++/8.3.0/bits/stl_algobase.h:368: error: undefined reference to '__wrap_memcpy'
/net/10.222.0.31/projects01/Orion/cluster/software/GCCcore/8.3.0/include/c++/8.3.0/bits/stl_algobase.h:368: error: undefined reference to '__wrap_memcpy'
/net/10.222.0.31/projects01/Orion/cluster/software/GCCcore/8.3.0/include/c++/8.3.0/bits/char_traits.h:352: error: undefined reference to '__wrap_memcpy'
collect2: error: ld returned 1 exit status
make: *** [edyeet] Error 1

I tried augmenting the src/common/memcpyLink.h file according to a similar issue in MashMap: marbl/MashMap#10
but resulting binary is not responding.

Help would be appreciated.

Thanks,
Michel

@ekg
Copy link
Owner

ekg commented Nov 5, 2020 via email

@MichelMoser
Copy link
Author

i switched to GSL, but same error occurs.

make
g++ -O3 -DNDEBUG -g -std=c++14 -Wno-deprecated-declarations -Isrc -I /cluster/software/GSL/2.5-GCC-7.3.0-2.30//include -include src/common/memcpyLink.h -Wl,--wrap=memcpy  src/yeet/yeet_main.cpp -o edyeet -L/cluster/software/GSL/2.5-GCC-7.3.0-2.30//lib -lgsl -lgslcblas -lstdc++ -lz -lm -lpthread
/net/10.222.0.31/projects01/Orion/cluster/software/GCCcore/7.3.0/include/c++/7.3.0/bits/char_traits.h:350: error: undefined reference to '__wrap_memcpy'
src/common/edlib.hxx:1364: error: undefined reference to '__wrap_memcpy'
src/common/edlib.hxx:1365: error: undefined reference to '__wrap_memcpy'
src/common/edlib.hxx:307: error: undefined reference to '__wrap_memcpy'
collect2: error: ld returned 1 exit status
make: *** [edyeet] Error 1

Should GCC version match the version mentioned in src/common/memcpyLink.h?

cat src/common/memcpyLink.h

/**
 * @file    memcpyLink.h
 * @author  Chirag Jain <[email protected]>
 */


__asm__(".symver memcpy,memcpy@GLIBC_2.2.5");

@ekg
Copy link
Owner

ekg commented Nov 5, 2020 via email

@MichelMoser
Copy link
Author

hmm, no this did not solve the problem.

Could you share your compilation settings and commands for edyeet?
So i can maybe backtrack the error.

I am on a Centos 7.8 node on a cluster. Maybe using a container would be better?

@MichelMoser
Copy link
Author

tried building the container based on the Dockerfile at pggb repo.

edyeet compiled successfully, but smoothxg is missing some files. probably some error introduced in the latest push?

Screenshot 2020-11-05 at 13 58 08

@subwaystation
Copy link

subwaystation commented Nov 5, 2020

Hi Michel,
thanks for reporting that the current Dockerfile of pggb is broken.
Currently taking a look at it.

@MichelMoser
Copy link
Author

great, thank you!

@subwaystation
Copy link

Was able to reproduce you the issue locally. Now trying a fix.

@subwaystation
Copy link

The Dockerfile in current master of pggb should work now. I tested it locally and in a Ubuntu VM. Please try it out :)
Or just wait, until the container was built.

@MichelMoser
Copy link
Author

great, we will test and report back

@MichelMoser
Copy link
Author

successfully built the container and ran the test dataset of pggb.
Thank you very much!

@MichelMoser
Copy link
Author

actually, smoothxg is failing because its missing an output option -o which can not be set within pggb

[seqwish::links] 0.439 links derived
[seqwish::gfa] 0.439 writing graph
[seqwish::gfa] 0.473 done
seqwish -t 16 -s /mnt/users/michelmo/tools/pggb/data/HLA/DRB1-3123.fa.gz -p /mnt/users/michelmo/tools/pggb/data/HLA/DRB1-3123.fa.gz.pggb-s3000-p70-n10-a70-K16-k8-w10000-j5000-e5000.paf -k 8 -g /mnt/users/michelmo/tools/pggb/data/HLA/DRB1-3123.fa.gz.pggb-s3000-p70-n10-a70-K16-k8-w10000-j5000-e5000.seqwish.gfa -P
0.33s user 0.19s system 90% cpu 0.59s total 26144Kb max memory
[smoothxg::main] error: Please specify an output file with -o/--smoothed-out
Command exited with non-zero status 1
smoothxg -t 16 -g /mnt/users/michelmo/tools/pggb/data/HLA/DRB1-3123.fa.gz.pggb-s3000-p70-n10-a70-K16-k8-w10000-j5000-e5000.seqwish.gfa -w 10000 -j 5000 -e 5000 -l 10000 -m /mnt/users/michelmo/tools/pggb/data/HLA/DRB1-3123.fa.gz.pggb-s3000-p70-n10-a70-K16-k8-w10000-j5000-e5000.smooth.maf -s /mnt/users/michelmo/tools/pggb/data/HLA/DRB1-3123.fa.gz.pggb-s3000-p70-n10-a70-K16-k8-w10000-j5000-e5000.consensus -a -C 10,100,1000,10000
0.00s user 0.05s system 96% cpu 0.05s total 2484Kb max memory

so smoothxg currently has to be run as a separate final step. But that's no big issue

@subwaystation
Copy link

@subwaystation
Copy link

Could it be that you didn't check out the latest master? Not sure, how I could reproduce your error.

@koolhazz
Copy link

-O2 ?

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

Successfully merging a pull request may close this issue.

4 participants