<div dir="ltr">Hey guys,<div><br></div><div>I'm trying to build erlang from source (tried github and tar.gz sources from <a href="http://erlang.org">erlang.org</a>)</div><div><br></div><div>I'm running into issues when it proceeds to build the pcre side of things.</div>

<div><br></div><div>Here's an excerpt of the point where `make` breaks:</div><div><div><font face="courier new, monospace">gcc -c -Werror=return-type -g -O2 -I/home/jamiel/repos/erlang/erts/x86_64-unknown-linux-gnu -fno-tree-copyrename -D_GNU_SOURCE -DERTS_SMP -DHAVE_CONFIG_H -Wall -Wstrict-prototypes -Wmissing-prototypes -Wdeclaration-after-statement -DUSE_THREADS -D_THREAD_SAFE -D_REENTRANT -DPOSIX_THREADS -D_POSIX_THREAD_SAFE_FUNCTIONS -DERLANG_INTEGRATION -o /home/jamiel/repos/erlang/erts/emulator/pcre/obj/x86_64-unknown-linux-gnu/opt/pcre_exec.o pcre/pcre_exec.c</font></div>

<div><font face="courier new, monospace">In file included from pcre/pcre_exec.c:4451:0:</font></div><div><font face="courier new, monospace">pcre/pcre_exec.c: In function ‘match’:</font></div><div><font face="courier new, monospace">pcre/pcre_exec_loop_break_cases.inc:3:1: error: label ‘L_LOOP_COUNT_585’ used but not defined</font></div>

<div><font face="courier new, monospace"> case 685: goto L_LOOP_COUNT_585;</font></div><div><font face="courier new, monospace"> ^</font></div><div><font face="courier new, monospace">pcre/pcre_exec_loop_break_cases.inc:2:1: error: label ‘L_LOOP_COUNT_499’ used but not defined</font></div>

<div><font face="courier new, monospace"> case 599: goto L_LOOP_COUNT_499;</font></div><div><font face="courier new, monospace"> ^</font></div><div><font face="courier new, monospace">pcre/pcre_exec_loop_break_cases.inc:1:1: error: label ‘L_LOOP_COUNT_474’ used but not defined</font></div>

<div><font face="courier new, monospace"> case 574: goto L_LOOP_COUNT_474;</font></div><div><font face="courier new, monospace"> ^</font></div><div><font face="courier new, monospace">pcre/<a href="http://pcre.mk:60">pcre.mk:60</a>: recipe for target '/home/jamiel/repos/erlang/erts/emulator/pcre/obj/x86_64-unknown-linux-gnu/opt/pcre_exec.o' failed</font></div>

</div><div><br></div><div>Full output of the (./configure && make) commands is here: <a href="https://gist.github.com/slashfoo/c71437a01e708086072f">https://gist.github.com/slashfoo/c71437a01e708086072f</a></div>
<div>
<div><br class="">My system is an x86_64 Arch Linux install with kernel 3.13.8-1</div><div><br></div><div><div>$ gcc --version</div><div>gcc (GCC) 4.8.2 20140206 (prerelease)</div></div><br></div><div>Other prereq versions:<br>

<div>m4 1.4.17-1</div><div>flex 2.5.39-1</div><div>perl 5.18.2-2</div><div>jre7-openjdk 7.u51_2.4.6-1</div><div>jdk7-openjdk 7.u51_2.4.6-1</div><div>make 4.0-2</div><div>gcc 4.8.2-8</div></div><div><div>libxslt 1.1.28-3</div>

<div>fop 1.1-1</div><div>autoconf 2.69-1</div></div><div><br></div><div>I have tried building other "tags" on the git checkout, and from their respective tarballs from <a href="http://erlang.org">erlang.org</a> with the same results.</div>

<div><br></div><div>Grepping for "L_LOOP_COUNT" on the source directory yields two files that make use of it, and the build-time-generated file <span style="color:rgb(0,0,0);font-family:Consolas,'Liberation Mono',Courier,monospace;font-size:12px;line-height:16.799999237060547px;white-space:pre">erts/emulator/pcre/pcre_exec_loop_break_cases.inc .
</span></div><div><br></div><div>Googling for L_LOOP_COUNT and erlang, etc yields no useful results, of which the most "informative" is this one: <a href="http://stackoverflow.com/questions/9647427/fail-to-compile-erlang-r14b03">http://stackoverflow.com/questions/9647427/fail-to-compile-erlang-r14b03</a><br>

<br>But the only use for that result is knowing that I'm not the only one seeing this and that the issue is at least 2 years old.</div><div><br></div><div>I'm not using MacOS, or kerl; I'm using Arch Linux, and building by HOWTO/INSTALL.md.</div>

<div><br></div><div>In a blind/crazy idea that it might be trying to use my system PCRE (8.34-2) instead of the one in the sources directory I tried installing some of those locally to my home directory and using LDFLAGS and CFLAGS pointing to lib/include dirs where I installed them. This had no effect. And, of course, running from a clean bash instance with no shell magic applied to the environment.</div>

<div><br></div><div>The reason I want to install from source is that I require R17 to poke around, and my distro doesn't have packages for it yet. When it failed, I tried building other Rs from source, and found I was getting the same issues.</div>

<div><br></div><div>I have the very deep feeling that I'm missing some simple thing, but can't spot it.</div><div><br></div><div>What steps would you suggest I follow? Any ideas?</div><div><br></div><div>Thanks in advance.<br clear="all">

<div><br></div>-- <br>Jamiel Almeida
</div></div>