Skip to contentSkip to conversation

Float error on SAMA5D3 Xplained using nodejs

Buildroot Cédric HEYMAN 2 participants 5 messages Dec 5, 2014 – Feb 7, 2015 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

Hello,

Trying to use nodejs's npm (built with buildroot 2014.11) on SAMA5D3 Xplained returns following error : 'ERROR: Binary compiled with -mfloat-abi=hard but without -DUSE_EABI_HARDFLOAT'

Looking in nodejs.mk shows that :
'....
NODEJS_CPU = arm
# V8 needs to know what floating point ABI the target is using. There's also

# a 'hard' option which we're not exposing here at the moment, because
# buildroot itself doesn't really support it at present.
ifeq ($(BR2_SOFT_FLOAT),y)
NODEJS_ARM_FP = soft
else
NODEJS_ARM_FP = softfp
endif
....'

It seems there is no support for 'hard' floating point for now.

To solve that, I intend to force '-DUSE_EABI_HARDFLOAT' in nodejs compilation package, but I don't know the way to do that; any advice ?

Another way to solve the problem could be to use 'soft' or 'softfp' floating point strategy but menuconfig does not propose this tuning, maybe...

Regards,

C?dric HEYMAN
Ing?nieur en D?veloppement embarqu?

T?l : 04.42.37.17.10| Fax : 04.42.24.28.98
Si?ge social : 350 rue de la Lauzi?re - Parc du Golf B?t 43 - CS 60481 - 13592 AIX-EN-PROVENCE CEDEX 3

<font face="Tahoma" size="1" color="#575F5E">
<a href="http://www.til-technologies.fr/bandeau_signature/redirection.html" target="_blank">
<img src="http://www.til-technologies.fr/bandeau_signature/bandeau.jpg" width="600" height="80" border="0" alt="Plus d'actualit?s sur www.til-technologies.fr" />
</a>
<br>
Les informations pr?c?dentes peuvent ?tre confidentielles ou privil?gi?es. Si vous n'?tes pas le destinataire pr?vu de ce mail, veuillez en notifier l'exp?diteur en r?pondant ? ce message puis supprimez-en toute trace de vos syst?mes. </font>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20141205/3bd701ab/attachment.html>

#1 lore raw

Dear C?dric HEYMAN,

Quoted 3 lines · C?dric HEYMAN

Trying to use nodejs's npm (built with buildroot 2014.11) on SAMA5D3 Xplained returns following error : 'ERROR: Binary compiled with -mfloat-abi=hard but without -DUSE_EABI_HARDFLOAT'

Thanks for your bug report.

Quoted 8 lines

Looking in nodejs.mk shows that :
'....
NODEJS_CPU = arm
# V8 needs to know what floating point ABI the target is using. There's also

# a 'hard' option which we're not exposing here at the moment, because
# buildroot itself doesn't really support it at present.

This comment seems bogus. I don't remember if it used to be true back when nodejs was added, but Buildroot definitely has support for 'hard'.

Quoted 7 lines

ifeq ($(BR2_SOFT_FLOAT),y)
NODEJS_ARM_FP = soft
else
NODEJS_ARM_FP = softfp
endif
....'

Quoted 7 lines

It seems there is no support for 'hard' floating point for now.

To solve that, I intend to force '-DUSE_EABI_HARDFLOAT' in nodejs compilation package, but I don't know the way to do that; any advice ?

Another way to solve the problem could be to use 'soft' or 'softfp' floating point strategy but menuconfig does not propose this tuning, maybe...

It does propose this tuning. Basically, you have three cases:

* soft float, i.e 'soft' in nodejs speak. This is enabled in Buildroot when BR2_ARM_EABI=y and BR2_SOFT_FLOAT=y.

* hard float using integer registers to pass floating point arguments, i.e 'softfp' in nodejs speak. This is enabled in Buildroot when BR2_ARM_EABI=y and BR2_SOFT_FLOAT is disabled.

* hard float using floating pointer registers to pass floating point arguments, i.e 'hard' in nodejs speak. This is enabled in Buildroot when BR2_ARM_EABIHF=y.

So I assume that you got this error in a BR2_ARM_EABIHF=y build, correct?

Can you try the completely untested patch below?

package/nodejs/nodejs.mk +5 -1
index 312aaa9..a776d5e 100644
@@ -59,11 +59,15 @@ NODEJS_CPU = arm
 # V8 needs to know what floating point ABI the target is using.  There's also
 # a 'hard' option which we're not exposing here at the moment, because
 # buildroot itself doesn't really support it at present.
+ifeq ($(BR2_ARM_EABIHF),y)
+NODEJS_ARM_FP = hard
+else
 ifeq ($(BR2_SOFT_FLOAT),y)
 NODEJS_ARM_FP = soft
 else
 NODEJS_ARM_FP = softfp
-endif
+endif # BR2_SOFT_FLOAT
+endif # BR2_ARM_EABIHF
 endif
 
 define NODEJS_CONFIGURE_CMDS

Thanks,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

A message that is not in the archive (sent off-list or not yet received): [email protected]

#3 lore raw

Dear C?dric HEYMAN,

Please keep the list in Cc, thanks.

Quoted 25 lines · C?dric HEYMAN

This patch solves the bug, thanks for your efficient support.

npm command result is now OK :

# npm

Usage: npm <command>

where <command> is one of:
add-user, adduser, apihelp, author, bin, bugs, c, cache, completion, config, ddp, dedupe, deprecate, docs, edit, explore, faq, find, find-dupes, get, help, help-search, home, i, info, init, install, isntall, issues, la, link, list, ll, ln, login, ls, outdated, owner, pack, prefix, prune, publish, r, rb, rebuild, remove, repo, restart, rm, root, run-script, s, se, search, set, show, shrinkwrap, star, stars, start, stop, submodule, t, tag, test, tst, un, uninstall, unlink, unpublish, unstar, up, update, v, version, view, whoami

npm <cmd> -h     quick help on <cmd>
npm -l           display full usage info
npm faq          commonly asked questions
npm help <term>  search for help on <term>
npm help npm     involved overview
Quoted 6 lines

Specify configs in the ini-formatted file:
/root/.npmrc
or on the command line via: npm <command> --key value Config info can be viewed via: npm help config

npm at 1.4.28 /usr/lib/node_modules/npm

Cool, nice to see that it works!

Quoted 1 line

Do I or do you submit patch ? (if me, please briefly indicate me how).

Feel free to submit a patch. You will find some guidelines at
http://buildroot.org/downloads/manual/manual.html#submitting-patches.

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#4 lore raw

Hello,

Unfortunately, we are not using git on our buildroot-2014.11 repository as I got the corresponding tarball to install it, and we actually archive under SVN on an internal server.

Is there another simple way to submit patch ?

Thanks

C?dric HEYMAN
Ing?nieur en D?veloppement embarqu?

T?l : 04.42.37.17.10| Fax : 04.42.24.28.98
Si?ge social : 350 rue de la Lauzi?re - Parc du Golf B?t 43 - CS 60481 - 13592 AIX-EN-PROVENCE CEDEX 3

-----Original Message-----
From: Thomas Petazzoni <[email protected]>
To: "C?dric HEYMAN" <[email protected]>
Cc: "buildroot at uclibc.org" <[email protected]>
Date: Fri, 5 Dec 2014 15:39:31 +0100
Subject: Re: [Buildroot] Float error on SAMA5D3 Xplained using nodejs

Dear C?dric HEYMAN,

Please keep the list in Cc, thanks.

Quoted 25 lines · C?dric HEYMAN

This patch solves the bug, thanks for your efficient support.

npm command result is now OK :

# npm

Usage: npm <command>

where <command> is one of:
add-user, adduser, apihelp, author, bin, bugs, c, cache, completion, config, ddp, dedupe, deprecate, docs, edit, explore, faq, find, find-dupes, get, help, help-search, home, i, info, init, install, isntall, issues, la, link, list, ll, ln, login, ls, outdated, owner, pack, prefix, prune, publish, r, rb, rebuild, remove, repo, restart, rm, root, run-script, s, se, search, set, show, shrinkwrap, star, stars, start, stop, submodule, t, tag, test, tst, un, uninstall, unlink, unpublish, unstar, up, update, v, version, view, whoami

npm <cmd> -h     quick help on <cmd>
npm -l           display full usage info
npm faq          commonly asked questions
npm help <term>  search for help on <term>
npm help npm     involved overview
Quoted 6 lines

Specify configs in the ini-formatted file:
/root/.npmrc
or on the command line via: npm <command> --key value Config info can be viewed via: npm help config

npm at 1.4.28 /usr/lib/node_modules/npm

Cool, nice to see that it works!

Quoted 1 line

Do I or do you submit patch ? (if me, please briefly indicate me how).

Feel free to submit a patch. You will find some guidelines at
http://buildroot.org/downloads/manual/manual.html#submitting-patches.

Thanks!

Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

<font face="Tahoma" size="1" color="#575F5E">
<a href="http://www.til-technologies.fr/bandeau_signature/redirection.html" target="_blank">
<img src="http://www.til-technologies.fr/bandeau_signature/bandeau.jpg" width="600" height="80" border="0" alt="Plus d'actualit?s sur www.til-technologies.fr" />
</a>
<br>
Les informations pr?c?dentes peuvent ?tre confidentielles ou privil?gi?es. Si vous n'?tes pas le destinataire pr?vu de ce mail, veuillez en notifier l'exp?diteur en r?pondant ? ce message puis supprimez-en toute trace de vos syst?mes. </font>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20141208/6673c266/attachment.html>

#5 lore raw

Dear C?dric HEYMAN,

Quoted 5 lines · C?dric HEYMAN

Unfortunately, we are not using git on our buildroot-2014.11 repository as I got the corresponding tarball to install it, and we actually archive under SVN on an internal server.

Is there another simple way to submit patch ?

This issue has been fixed in commit
4f09b5b484af374b86af0db9e171f22fffffc8f0.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com