[erlang-questions] unable to build valgrind-enabled erlang runtime

Kris Prieb <>
Wed Mar 5 07:42:16 CET 2014


Ok, I've carried out the steps recommended, and valgrind-enabled emulator
is now up and running.  Thank you!

Kris




On Tue, Mar 4, 2014 at 4:39 AM, Sverker Eriksson <
> wrote:

> You have to disable hipe:
>
> ./configure --disable-hipe
>
>
> After successful build, set
> export VALGRIND_LOG_DIR=/my/valgrind/log/dir
> export VALGRIND_MISC_FLAGS="--suppressions=$ERL_TOP/erts/
> emulator/valgrind/suppress.standard --show-possibly-lost=no"
>
> and run with
> $ERL_TOP/bin/cerl -valgrind
>
> /Sverker
>
>
> On 03/04/2014 09:45 AM, Kris Prieb wrote:
>
>> Hello List and Sverker,
>>
>> Thank you for your assistance.  I did have valgrind installed prior to
>> running configure, but not its source code.  Installing the source code
>> and
>> running configure again did fix the problem of the missing include file
>> just as you indicated.
>>
>> However, I am still unable to build the valgrind-enabled emulator due to
>> occurence of other errors.  After calling:
>>
>> env ERL_TOP=/home/ec2-user/otp_src_R16B02 make valgrind FLAVOR=smp
>>
>> I receive the following errors:
>>
>> ...
>> ...
>> obj/x86_64-unknown-linux-gnu/valgrind/smp/hipe_bif0.o:(.data+0x5b40):
>> undefined reference to `nbif_emulate_fpe'
>> obj/x86_64-unknown-linux-gnu/valgrind/smp/hipe_amd64_bifs.o: In function
>> `nbif_handle_fp_exception':
>> /home/ec2-user/otp_src_R16B02/erts/emulator/x86_64-unknown-
>> linux-gnu/valgrind/smp/hipe_amd64_bifs.S:287:
>> undefined reference to `erts_restore_fpu'
>> collect2: ld returned 1 exit status
>> make[1]: ***
>> [/home/ec2-user/otp_src_R16B02/bin/x86_64-unknown-
>> linux-gnu/beam.valgrind.smp]
>> Error 1
>> make[1]: Leaving directory `/home/ec2-user/otp_src_R16B02/erts/emulator'
>>
>>
>> Would appreciate any suggestions as to how to fix this.
>>
>> Kris
>>
>>
>> On Mon, Mar 3, 2014 at 8:45 AM, Sverker Eriksson <
>> > wrote:
>>
>>  On 03/01/2014 12:12 AM, Kris Prieb wrote:
>>>
>>>  Hello List,
>>>>
>>>> I am attempting to build a valgrind-enabled erlang runtime per:
>>>> http://www.erlang.org/doc/installation_guide/INSTALL.html#id72660
>>>>
>>>> My platform is an amazon linux machine image on ec2 on which I have
>>>> already
>>>> installed an erlang disribution from source.
>>>>
>>>> I entered the following at the command prompt:
>>>>
>>>> [ emulator]$ env
>>>> ERL_TOP=/home/ec2-user/otp_src_R16B02 FLAVOR=smp make valgrind
>>>> FLAVOR=$FLAVOR
>>>>
>>>> The following was returned:
>>>>
>>>> make -f x86_64-unknown-linux-gnu/Makefile TYPE=valgrind
>>>> can't open x86_64-unknown-linux-gnu/valgrind/plain/erl_compile_flags.h
>>>> for
>>>> writing at utils/make_compiler_flags line 65.
>>>> make[1]: Entering directory `/home/ec2-user/otp_src_
>>>> R16B02/erts/emulator'
>>>> if utils/gen_git_version x86_64-unknown-linux-gnu/gen_git_version.mk;
>>>> then
>>>> touch beam/erl_bif_info.c; fi
>>>> *** valgrind emulator disabled by configure - omitted target all
>>>> make[1]: Leaving directory `/home/ec2-user/otp_src_
>>>> R16B02/erts/emulator'
>>>>
>>>>
>>>> What have I done wrong here?  Do I have to run "configure" with special
>>>> arguments before building valgrind-enabled runtime?
>>>>
>>>> Any help would be much appreciated!
>>>> Kris
>>>>
>>>>
>>>>  If configure does not find a working valgrind, that target will be
>>> disabled.
>>>
>>> Search for "valgrind" in erts/config.log to see what failed. It probably
>>> failed to compile #include <valgrind/valgrind.h>.
>>>
>>> If your valgrind is installed in a non-standard place, point it out to
>>> configure with CPPFLAGS=-I/my/valgrind/install/dir/include.
>>>
>>> /Sverker, Erlang/OTP
>>>
>>>
>>>
>>>
>>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20140305/328bfb62/attachment.html>


More information about the erlang-questions mailing list