<p>Compile with gcc or remove <code>inline</code> from <code>librna/fold.c:776</code> and <code>librna/fold.c:846</code>.</p>

CC BY-SA 4.0
2019-02-01T20:42:33.770Z
2019-02-01T20:42:33.770Z
user172818
<p>The other option would be to use RNAz via a docker container instead on installing it directly.  The docker container can be downloaded from <a href="https://quay.io/repository/biocontainers/rnaz" rel="nofollow noreferrer">biocontainers</a>.  If you are new to docker here is a <a href="https://docs.docker.com/docker-for-mac/" rel="nofollow noreferrer">tutorial for mac</a>.</p>

CC BY-SA 4.0
2019-02-01T17:31:06.743Z
2019-02-01T17:31:06.743Z
Bioathlete
<p>The first thing to try is to perform the install as sudo.</p>

<pre><code>sudo ./configure # definitely
sudo make ... sudo make install # possibly (?)
</code></pre>

<p>The clang++ compiler may be using a path that is not setup in your profile and sudo will overcome this. If sudo works you know what the problem is and its a case of changing permissions and configurations accordingly. There is a good chance this will resolve the matter.</p>

<p>There are other possibilities, it could be the compiler. It looks like the compiler is fine however looking at the config file and the check. The final issue is it could be the program ;-)</p>

<blockquote>
  <p>Tried this. Same result. Will continue scratching head</p>
</blockquote>

<p>Try an installation on Linux</p>

<p>Otherwise its usual stuff, namely upgrading Xtools</p>

CC BY-SA 4.0
2019-02-01T17:24:03.653Z
Tried this. Same result. Will continue scratching head.
PartialOrder
CC BY-SA 4.0
2019-02-01T17:28:33.177Z
Xtools or Linux ... Linux has a better chance
M__
CC BY-SA 4.0
2019-02-01T17:29:56.173Z
Xtools is current. Yeah. I know things will likely compile A-OK with Linux. Will try that too. Thanks.
PartialOrder
CC BY-SA 4.0
2019-02-01T17:17:58.450Z
2019-02-01T17:25:47.763Z
2019-02-01T17:25:47.763Z
M__
<p>Having trouble building RNAz 2.1 on MacOS. Following instructions at <a href="https://www.tbi.univie.ac.at/software/RNAz/" rel="nofollow noreferrer">https://www.tbi.univie.ac.at/software/RNAz/</a></p>

<pre><code>tar -xzf RNAz-2.1-tar.gz
cd RNAz-2.1
./configure
make
</code></pre>

<p><code>make</code> fails with </p>

<pre><code>/usr/bin/clang++ -o RNAz RNAz.o rnaz_utils.o svm_helper.o zscore.o cmdline.o strand.o svm.o -L../librna -lRNA -lm 
Undefined symbols for architecture x86_64:
  "_HairpinE", referenced from:
      _alifold in libRNA.a(alifold.o)
      _fill_arrays in libRNA.a(fold.o)
      _backtrack in libRNA.a(fold.o)
      _stack_energy in libRNA.a(fold.o)
  "_LoopEnergy", referenced from:
      _alifold in libRNA.a(alifold.o)
      _fill_arrays in libRNA.a(fold.o)
      _backtrack in libRNA.a(fold.o)
      _stack_energy in libRNA.a(fold.o)
ld: symbol(s) not found for architecture x86_64
</code></pre>

<p>Thinking that compiling for 32-bit might work I tried setting </p>

<pre><code>CXXFLAGS = -m32
LDFLAGS = -m32
</code></pre>

<p>without success (same result). Same result with <code>gmake</code>.</p>

<p><strong>Configure</strong>
Configure checks for <code>gcc</code></p>

<pre><code>...
checking for gcc... gcc
checking whether the C compiler works... yes
...
</code></pre>

<p><strong>Makefile</strong></p>

<p>Makefile specifies the following:</p>

<pre><code>CC = gcc
CCDEPMODE = depmode=gcc3
CFLAGS = -g -O2
CPP = gcc -E
CPPFLAGS = 
CXX = g++
CXXDEPMODE = depmode=gcc3
CXXFLAGS = -g -O2
</code></pre>

<p><strong>Compiler</strong></p>

<p>Apple LLVM version 10.0.0 (clang-1000.11.45.5)</p>

<p>Target: x86_64-apple-darwin18.2.0</p>

<p>Thread model: posix</p>

<p>InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin</p>

<p>Has anyone built this successfully on MacOS? Or perhaps suggestions as to how I might build this successfully? I'm at a loss.</p>

<rna>
Building RNAz on MacOS
# Building RNAz on MacOS

(Asked by: username_0 on 2019-02-01)

Having trouble building RNAz 2.1 on MacOS. Following instructions at https://www.tbi.univie.ac.at/software/RNAz/
tar -xzf RNAz-2.1-tar.gz
cd RNAz-2.1
./configure
make

make fails with 
/usr/bin/clang++ -o RNAz RNAz.o rnaz_utils.o svm_helper.o zscore.o cmdline.o strand.o svm.o -L../librna -lRNA -lm 
Undefined symbols for architecture x86_64:
  "_HairpinE", referenced from:
      _alifold in libRNA.a(alifold.o)
      _fill_arrays in libRNA.a(fold.o)
      _backtrack in libRNA.a(fold.o)
      _stack_energy in libRNA.a(fold.o)
  "_LoopEnergy", referenced from:
      _alifold in libRNA.a(alifold.o)
      _fill_arrays in libRNA.a(fold.o)
      _backtrack in libRNA.a(fold.o)
      _stack_energy in libRNA.a(fold.o)
ld: symbol(s) not found for architecture x86_64

Thinking that compiling for 32-bit might work I tried setting 
CXXFLAGS = -m32
LDFLAGS = -m32

without success (same result). Same result with gmake.
Configure
Configure checks for gcc
...
checking for gcc... gcc
checking whether the C compiler works... yes
...

Makefile
Makefile specifies the following:
CC = gcc
CCDEPMODE = depmode=gcc3
CFLAGS = -g -O2
CPP = gcc -E
CPPFLAGS = 
CXX = g++
CXXDEPMODE = depmode=gcc3
CXXFLAGS = -g -O2

Compiler
Apple LLVM version 10.0.0 (clang-1000.11.45.5)
Target: x86_64-apple-darwin18.2.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
Has anyone built this successfully on MacOS? Or perhaps suggestions as to how I might build this successfully? I'm at a loss.

**Tags:** rna

---

## 3 answers

### Answer by username_1 on 2019-02-01. Score: 3 | Accepted answer

Compile with gcc or remove `inline` from `librna/fold.c:776` and `librna/fold.c:846`.


---

### Answer by username_2 on 2019-02-01. Score: 2

The other option would be to use RNAz via a docker container instead on installing it directly. The docker container can be downloaded from [biocontainers](https://quay.io/repository/biocontainers/rnaz). If you are new to docker here is a [tutorial for mac](https://docs.docker.com/docker-for-mac/).


---

### Answer by username_3 on 2019-02-01. Score: 1

The first thing to try is to perform the install as sudo.
sudo ./configure # definitely
sudo make ... sudo make install # possibly (?)

The clang++ compiler may be using a path that is not setup in your profile and sudo will overcome this. If sudo works you know what the problem is and its a case of changing permissions and configurations accordingly. There is a good chance this will resolve the matter.
There are other possibilities, it could be the compiler. It looks like the compiler is fine however looking at the config file and the check. The final issue is it could be the program ;-)

Tried this. Same result. Will continue scratching head

Try an installation on Linux
Otherwise its usual stuff, namely upgrading Xtools

> **Comments:**
> **username_0**: Tried this. Same result. Will continue scratching head.  
> **username_3**: Xtools or Linux ... Linux has a better chance  
> **username_0**: Xtools is current. Yeah. I know things will likely compile A-OK with Linux. Will try that too. Thanks.  

---

