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

Fix compilation on newer gcc versions #141

Merged
merged 1 commit into from
Oct 24, 2022
Merged

Conversation

JacobHayes
Copy link

@JacobHayes JacobHayes commented Oct 14, 2022

Follow up to #135 (comment) - that PR was closed in favor of #136, but they handled different GCC compilation issues. This fixes the last compilation issue, but with a slight tweak to #135 to use delete[].


I was able to reproduce the issue and fix by running docker run --rm -it ubuntu:22.04 bash and then running the following:

apt-get update
apt-get install -yq --no-install-recommends automake build-essential ca-certificates libbz2-dev libcurl4-openssl-dev liblzma-dev wget zlib1g-dev

# Install htslib
mkdir -p /tmp/htslib
cd /tmp/htslib
wget https://github.com/samtools/htslib/releases/download/1.16/htslib-1.16.tar.bz2
tar -xjf htslib-1.16.tar.bz2
cd htslib-1.16
make
make install
cd /tmp
rm -rf /tmp/htslib
ldconfig

# Install ivar
mkdir -p /tmp/ivar
cd /tmp/ivar
wget -O ivar.tar.gz https://github.com/andersen-lab/ivar/archive/bafc7b93b195b83caf0a8e8054f49565cb6dee79.tar.gz
tar --strip-components=1 -xf ivar.tar.gz
./autogen.sh
./configure
#####################################################
make # fails
sed -i 's/free(files);/delete[] files;/' src/ivar.cpp
make # succeeds now
#####################################################

@cmaceves
Copy link
Collaborator

@JacobHayes okay, thank you for bringing this up, approving github action tests, and I will take a look at the code!

@JacobHayes
Copy link
Author

Thanks!

@cmaceves cmaceves added the bug Something isn't working label Oct 15, 2022
@cmaceves cmaceves self-assigned this Oct 15, 2022
@cmaceves cmaceves merged commit e09697d into andersen-lab:master Oct 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

Successfully merging this pull request may close these issues.

None yet

2 participants