[erlang-questions] Problems building erlang from source

Lukas Larsson garazdawi@REDACTED
Mon Apr 7 11:31:45 CEST 2014


Hello,

I'm not sure why, but it seems like on your system for some reason the
expression below does not filter out the "COST_CHK(N)" clauses:

grep -n COST_CHK erts/emulator/pcre/pcre_exec.c | grep -v 'COST_CHK(N)'
691:  COST_CHK(1);
1792: COST_CHK(1);
1899:  COST_CHK(1);
2067:    COST_CHK(1);
2087:    COST_CHK(1);
2184:  COST_CHK(1);
2412:    COST_CHK(1);
2483:  COST_CHK(1);
2522:  COST_CHK(1);
2716:    COST_CHK(1);
2735:    COST_CHK(1);
2846:    COST_CHK(1);
3035:    COST_CHK(1);
3849:    COST_CHK(1);
3865:    COST_CHK(1);
3879:    COST_CHK(1);
3893:    COST_CHK(1);
3907:    COST_CHK(1);
3945:    COST_CHK(1);
3947:    COST_CHK(1);
3993: COST_CHK(1);
4003: COST_CHK(1);
4019: COST_CHK(1);
4058:    COST_CHK(1);
4097:    COST_CHK(1);
4124:    COST_CHK(1);
4136:    COST_CHK(1);
4148:    COST_CHK(1);
4160:    COST_CHK(1);
4172:    COST_CHK(1);
4184:    COST_CHK(1);
4196:    COST_CHK(1);
4229:      COST_CHK(1);
4260:    COST_CHK(1);
4271:    COST_CHK(1);
4282:    COST_CHK(1);
4294:    COST_CHK(1);
4306:    COST_CHK(1);
4316:    COST_CHK(1);
4326:    COST_CHK(1);
4336:    COST_CHK(1);
4346:    COST_CHK(1);
4356:    COST_CHK(1);
4366:    COST_CHK(1);

What version of grep are you using?

Lukas


On Mon, Apr 7, 2014 at 12:57 AM, Jamiel Almeida <slashfoo@REDACTED> wrote:

> Hey guys,
>
> I'm trying to build erlang from source (tried github and tar.gz sources
> from erlang.org)
>
> I'm running into issues when it proceeds to build the pcre side of things.
>
> Here's an excerpt of the point where `make` breaks:
> 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
> In file included from pcre/pcre_exec.c:4451:0:
> pcre/pcre_exec.c: In function 'match':
> pcre/pcre_exec_loop_break_cases.inc:3:1: error: label 'L_LOOP_COUNT_585'
> used but not defined
>  case 685: goto L_LOOP_COUNT_585;
>  ^
> pcre/pcre_exec_loop_break_cases.inc:2:1: error: label 'L_LOOP_COUNT_499'
> used but not defined
>  case 599: goto L_LOOP_COUNT_499;
>  ^
> pcre/pcre_exec_loop_break_cases.inc:1:1: error: label 'L_LOOP_COUNT_474'
> used but not defined
>  case 574: goto L_LOOP_COUNT_474;
>  ^
> pcre/pcre.mk:60: recipe for target
> '/home/jamiel/repos/erlang/erts/emulator/pcre/obj/x86_64-unknown-linux-gnu/opt/pcre_exec.o'
> failed
>
> Full output of the (./configure && make) commands is here:
> https://gist.github.com/slashfoo/c71437a01e708086072f
>
> My system is an x86_64 Arch Linux install with kernel 3.13.8-1
>
> $ gcc --version
> gcc (GCC) 4.8.2 20140206 (prerelease)
>
> Other prereq versions:
> m4 1.4.17-1
> flex 2.5.39-1
> perl 5.18.2-2
> jre7-openjdk 7.u51_2.4.6-1
> jdk7-openjdk 7.u51_2.4.6-1
> make 4.0-2
> gcc 4.8.2-8
> libxslt 1.1.28-3
> fop 1.1-1
> autoconf 2.69-1
>
> I have tried building other "tags" on the git checkout, and from their
> respective tarballs from erlang.org with the same results.
>
> Grepping for "L_LOOP_COUNT" on the source directory yields two files that
> make use of it, and the build-time-generated file erts/emulator/pcre/pcre_exec_loop_break_cases.inc
> .
>
> Googling for L_LOOP_COUNT and erlang, etc yields no useful results, of
> which the most "informative" is this one:
> http://stackoverflow.com/questions/9647427/fail-to-compile-erlang-r14b03
>
> 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.
>
> I'm not using MacOS, or kerl; I'm using Arch Linux, and building by
> HOWTO/INSTALL.md.
>
> 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.
>
> 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.
>
> I have the very deep feeling that I'm missing some simple thing, but can't
> spot it.
>
> What steps would you suggest I follow? Any ideas?
>
> Thanks in advance.
>
> --
> Jamiel Almeida
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20140407/621fe296/attachment.htm>


More information about the erlang-questions mailing list