[erlang-bugs] --enable-native-libs is broken
Louis-Philippe Gauthier
louis-philippe.gauthier@REDACTED
Fri Jul 18 14:57:20 CEST 2014
Hi Kostis,
Doing make clean doesn't work since the Makefiles are not generated yet...
Downloads $ tar -xzf otp_src_17.1.tar.gz && cd otp_src_17.1/
otp_src_17.1 $ make clean
make: *** No rule to make target `clean'. Stop.
I've written a new Gentoo Ebuild that installs from Git and everything
works as expected. I'll just install from Git when I need native libs.
ebuild: https://gist.github.com/lpgauth/00d16e006be059b75d26
h052 erlang # erl
Erlang/OTP 17 [erts-6.1.2] [source] [64-bit] [smp:32:32] [async-threads:10]
[hipe] [kernel-poll:false]
Eshell V6.1.2 (abort with ^G)
1> code:is_loaded(gen_server).
{file,"/usr/lib64/erlang/lib/stdlib-2.1.1/ebin/gen_server.beam"}
2> code:is_module_native(gen_server).
true
By the way, I've tried reproducing the HiPE binary "corruption" issue I was
experiencing on R16 and it seems fixed.
Thanks,
LP
On Fri, Jul 18, 2014 at 3:18 AM, Kostis Sagonas <kostis@REDACTED> wrote:
> On 07/18/2014 07:46 AM, Louis-Philippe Gauthier wrote:
>
>> Hi,
>> I've been trying to compile 17.1 with native libs... without any
>> success. I get different errors on Linux and OSX.
>>
>> Linux:
>>
>> % build
>>
>> tar -xzf otp_src_17.1.tar.gz && cd otp_src_17.1/
>> ./configure --enable-smp-support --enable-threads --enable-kernel-poll
>> --enable-hipe --enable-native-libs
>> make
>>
>> % install
>>
>> sudo su
>> rm -rf /usr/local/lib/erlang/
>> make install
>>
>> % test
>>
>> erl
>> Erlang/OTP 17 [erts-6.1] [source] [64-bit] [smp:2:2] [async-threads:10]
>> [hipe] [kernel-poll:false]
>>
>> Eshell V6.1 (abort with ^G)
>> 1> code:is_loaded(gen_server).
>> {file,"/usr/local/lib/erlang/lib/stdlib-2.1/ebin/gen_server.beam"}
>> 2> code:is_module_native(gen_server).
>> false
>>
>
> This is a known issue. It's due to the fact that the tar balls that are
> distributed by Ericsson have prebuilt .beam files in them, which do not
> contain native code. For these files, the options supplied to configure
> are ineffective. (I would actually classify this as a bug.)
>
> So, one needs to do a make clean after unpacking. Try the following
> sequence of commands:
>
>
> tar -xzf otp_src_17.1.tar.gz && cd otp_src_17.1/
> make clean
>
> ./configure --enable-smp-support --enable-threads --enable-kernel-poll
> --enable-hipe --enable-native-libs
> make
>
> This should give you a system with .beam files containing native code for
> the main applications (e.g. kernel, stdlib, compiler, ...)
>
>
> For the OSX issues I cannot help you much I am afraid since I do not have
> access to such an environment to try it out.
>
> Kostis
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-bugs/attachments/20140718/527455ad/attachment.htm>
More information about the erlang-bugs
mailing list