-
Notifications
You must be signed in to change notification settings - Fork 30.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compilation Fails for 7.4.0 on OpenBSD 6.0 #10904
Comments
/cc @nodejs/v8 @nodejs/build |
Does this patch fix it? diff --git a/deps/v8/src/v8.gyp b/deps/v8/src/v8.gyp
index 1adb2fe..698e687 100644
--- a/deps/v8/src/v8.gyp
+++ b/deps/v8/src/v8.gyp
@@ -1917,16 +1917,17 @@
}
],
['OS=="openbsd"', {
'link_settings': {
'libraries': [
'-L/usr/local/lib -lexecinfo',
]},
'sources': [
+ 'base/debug/stack_trace_posix.cc',
'base/platform/platform-openbsd.cc',
'base/platform/platform-posix.cc'
],
}
],
['OS=="netbsd"', {
'link_settings': {
'libraries': [ |
The patch fixes that problem.
Off to t-shoot some other things - like why it seems g++ is hardcoded in
places rather than following CXX, and why I get "permission denied" running
things in the node-v7.4.0/out/Release/ directory.
Thanks for your help.
Regards,
…-Adam
On Fri, Jan 20, 2017 at 12:16 AM, Ben Noordhuis ***@***.***> wrote:
Does this patch fix it?
diff --git a/deps/v8/src/v8.gyp b/deps/v8/src/v8.gyp
index 1adb2fe..698e687 100644--- a/deps/v8/src/v8.gyp+++ b/deps/v8/src/v8.gyp@@ -1917,16 +1917,17 @@
}
],
['OS=="openbsd"', {
'link_settings': {
'libraries': [
'-L/usr/local/lib -lexecinfo',
]},
'sources': [+ 'base/debug/stack_trace_posix.cc',
'base/platform/platform-openbsd.cc',
'base/platform/platform-posix.cc'
],
}
],
['OS=="netbsd"', {
'link_settings': {
'libraries': [
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#10904 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AIEmBFZpqtiRi4ZwoDuJoPuwpCadYErdks5rUG16gaJpZM4LowM6>
.
|
@AdamNewman please point to where |
Presently that is just speculation. On my last pass through after incorporating the patch you sent I started to encounter "-std=gnu++0x" errors, even though I'd set CXX to eg++ and CC set to egcc. After crudely symlinking /usr/local/bin/eg++ to /usr/bin/g++ to temporarily replace 4.2.1 with 4.9.4, things went fine... for a while. =)
Here is where things stop when I don't symlink:
g++ '-DU_COMMON_IMPLEMENTATION=1' '-DU_I18N_IMPLEMENTATION=1' '-DU_IO_IMPLEMENTATION=1' '-DU_TOOLUTIL_IMPLEMENTATION=1' '-DU_ATTRIBUTE_DEPRECATED=' '-D_CRT_SECURE_NO_DEPRECATE=' '-DU_STATIC_IMPLEMENTATION=1' '-DUCONFIG_NO_SERVICE=1' '-DUCONFIG_NO_REGULAR_EXPRESSIONS=1' '-DU_ENABLE_DYLOAD=0' '-DU_HAVE_STD_STRING=0' '-DUCONFIG_NO_BREAK_ITERATION=0' '-DUCONFIG_NO_LEGACY_CONVERSION=1' -I../deps/icu-small/source/common -I../deps/icu-small/source/i18n -I../deps/icu-small/source/io -I../deps/icu-small/source/tools/toolutil -pthread -Wall -Wextra -Wno-unused-parameter -m64 -Wno-deprecated-declarations -O3 -fno-omit-frame-pointer -fno-exceptions -std=gnu++0x -frtti -MMD -MF /home/adam/src/node-v7.4.0/out/Release/.deps//home/adam/src/node-v7.4.0/out/Release/obj.host/icutools/deps/icu-small/source/tools/toolutil/collationinfo.o.d.raw -c -o /home/adam/src/node-v7.4.0/out/Release/obj.host/icutools/deps/icu-small/source/tools/toolutil/collationinfo.o ../deps/icu-small/source/tools/toolutil/collationinfo.cpp
cc1plus: error: unrecognized command line option "-std=gnu++0x"
gmake[1]: *** [tools/icu/icutools.host.mk:525: /home/adam/src/node-v7.4.0/out/Release/obj.host/icutools/deps/icu-small/source/tools/toolutil/collationinfo.o] Error 1
gmake[1]: Leaving directory '/home/adam/src/node-v7.4.0/out'
gmake: *** [Makefile:73: node] Error 2
adam@zero (node-v7.4.0):
Cheers,
…-Adam
On Jan 20, 2017, at 11:01 AM, Johan Bergström ***@***.***> wrote:
@AdamNewman <https://github.com/AdamNewman> please point to where g++ is hardcoded, if you find any places. We pass clang++ to CXX as compiler on for instance FreeBSD which works fine.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#10904 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AIEmBAhyeFpPELX-zrCpWmImiNlmKD2pks5rUQSHgaJpZM4LowM6>.
|
Try building with |
That seems to fix that issue. Now I am down to this:
eg++ '-DUCONFIG_NO_SERVICE=1' '-DUCONFIG_NO_REGULAR_EXPRESSIONS=1'
'-DU_ENABLE_DYLOAD=0' '-DU_STATIC_IMPLEMENTATION=1' '-DU_HAVE_STD_STRING=0'
'-DUCONFIG_NO_BREAK_ITERATION=0' '-DUCONFIG_NO_LEGACY_CONVERSION=1'
-I../deps/icu-small/source/common -I../deps/icu-small/source/i18n
-I../deps/icu-small/source/io -I../deps/icu-small/source/tools/toolutil
-pthread -Wall -Wextra -Wno-unused-parameter -m64 -O3
-fno-omit-frame-pointer -fno-rtti -fno-exceptions -std=gnu++0x -MMD -MF
/home/adam/src/node-v7.4.0/out/Release/.deps//home/adam/src/node-v7.4.0/out/Release/obj.host/iculslocs/tools/icu/no-op.o.d.raw
-c -o
/home/adam/src/node-v7.4.0/out/Release/obj.host/iculslocs/tools/icu/no-op.o
../tools/icu/no-op.cc
eg++ -pthread -rdynamic -m64 -Wl,-z,wxneeded -o
/home/adam/src/node-v7.4.0/out/Release/iculslocs -Wl,--start-group
/home/adam/src/node-v7.4.0/out/Release/obj.host/iculslocs/tools/icu/iculslocs.o
/home/adam/src/node-v7.4.0/out/Release/obj.host/iculslocs/tools/icu/no-op.o
/home/adam/src/node-v7.4.0/out/Release/obj.host/tools/icu/libicutools.a
-Wl,--end-group
/home/adam/src/node-v7.4.0/out/Release/obj.host/tools/icu/libicutools.a(putil.o):
In function `uprv_getDefaultLocaleID_58':
putil.cpp:(.text+0x1bb7): warning: warning: strcat() is almost always
misused, please use strlcat()
/home/adam/src/node-v7.4.0/out/Release/obj.host/tools/icu/libicutools.a(uloc.o):
In function `uloc_acceptLanguageFromHTTP_58':
uloc.cpp:(.text+0x45fa): warning: warning: sprintf() is often misused,
please use snprintf()
/home/adam/src/node-v7.4.0/out/Release/obj.host/tools/icu/libicutools.a(uresbund.o):
In function `ures_getFunctionalEquivalent_58':
uresbund.cpp:(.text+0x8e86): warning: warning: stpcpy() is dangerous; do
not use it
/home/adam/src/node-v7.4.0/out/Release/obj.host/tools/icu/libicutools.a(putil.o):
In function `u_setDataDirectory_58':
putil.cpp:(.text+0x154f): warning: warning: strcpy() is almost always
misused, please use strlcpy()
LD_LIBRARY_PATH=/home/adam/src/node-v7.4.0/out/Release/lib.host:/home/adam/src/node-v7.4.0/out/Release/lib.target:$LD_LIBRARY_PATH;
export LD_LIBRARY_PATH; cd ../tools/icu; mkdir -p
/home/adam/src/node-v7.4.0/out/Release/obj/gen/icutmp; python icutrim.py -P
"/home/adam/src/node-v7.4.0/out/Release" -D
../../deps/icu-small/source/data/in/icudt58l.dat --delete-tmp -T
"/home/adam/src/node-v7.4.0/out/Release/obj/gen/icutmp" -F icu_small.json
-O icudt58l.dat -v -L en,root
Options: {'verbose': 1, 'filterfile': 'icu_small.json', 'toolpath':
'/home/adam/src/node-v7.4.0/out/Release', 'deltmpdir': 1, 'outfile':
'icudt58l.dat', 'datfile':
'../../deps/icu-small/source/data/in/icudt58l.dat', 'locales': 'en,root',
'endian': 'little', 'tmpdir':
'/home/adam/src/node-v7.4.0/out/Release/obj/gen/icutmp'}
icu_small.json: icutrim.py config: Trim down ICU to just a certain locale
set, needed for node.js use.
sh: /home/adam/src/node-v7.4.0/out/Release/icupkg: Permission denied
FAILED: /home/adam/src/node-v7.4.0/out/Release/icupkg -tl
../../deps/icu-small/source/data/in/icudt58l.dat
/home/adam/src/node-v7.4.0/out/Release/obj/gen/icutmp/icudt58l.dat
gmake[1]: *** [tools/icu/icudata.target.mk:13:
/home/adam/src/node-v7.4.0/out/Release/obj/gen/icutmp/icudt58l.dat] Error 1
gmake[1]: Leaving directory '/home/adam/src/node-v7.4.0/out'
gmake: *** [Makefile:73: node] Error 2
adam@athena (node-v7.4.0):
Thanks for your help.
Regards,
…-Adam
On Sat, Jan 21, 2017 at 9:56 AM, Ben Noordhuis ***@***.***> wrote:
Try building with make CXX=eg++ CXX.host=eg++ CXX.target=eg++. You may
have to override LINK that way as well.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#10904 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AIEmBCe0j-wOh0MipONGwd8uj-ws40o5ks5rUka2gaJpZM4LowM6>
.
|
What does |
Things in that directory all share that problem:
[adam@athena ~/src/node-v7.4.0/out/Release]: ./icupkg
-bash: ./icupkg: Permission denied
[adam@athena ~/src/node-v7.4.0/out/Release]: ./mkpeephole
-bash: ./mkpeephole: Permission denied
[adam@athena ~/src/node-v7.4.0/out/Release]: ./genrb
-bash: ./genrb: Permission denied
[adam@athena ~/src/node-v7.4.0/out/Release]: ./genccode
-bash: ./genccode: Permission denied
[adam@athena ~/src/node-v7.4.0/out/Release]:
[adam@athena ~/src/node-v7.4.0/out/Release]: ls -alh
total 35216
drwxr-xr-x 6 adam adam 512B Jan 22 15:03 .
drwxr-xr-x 5 adam adam 512B Jan 22 14:36 ..
drwxr-xr-x 3 adam adam 512B Jan 22 14:36 .deps
-rwxr-xr-x 1 adam adam 3.7M Jan 22 15:03 genccode
-rwxr-xr-x 1 adam adam 5.7M Jan 22 15:03 genrb
-rwxr-xr-x 1 adam adam 4.6M Jan 22 15:03 iculslocs
-rwxr-xr-x 1 adam adam 3.8M Jan 22 15:03 icupkg
-rwxr-xr-x 1 adam adam 187K Jan 22 15:00 mkpeephole
drwxr-xr-x 3 adam adam 512B Jan 22 14:48 obj
drwxr-xr-x 8 adam adam 512B Jan 22 15:03 obj.host
drwxr-xr-x 13 adam adam 512B Jan 22 15:00 obj.target
…On Sun, Jan 22, 2017 at 3:17 AM, Ben Noordhuis ***@***.***> wrote:
What does file out/Release/icupkg print? Does it have the execute bit set?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#10904 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AIEmBPbIzq3-0QG8Fnbm5v-zDDgcmCwtks5rUzrdgaJpZM4LowM6>
.
|
What does file(1) print for those files? |
*facepalm*. I'm sorry.
[adam@athena ~/src/node-v7.4.0]: file out/Release/icupkg
out/Release/icupkg: ELF 64-bit LSB shared object, x86-64, version 1
…On Sun, Jan 22, 2017 at 9:50 PM, Ben Noordhuis ***@***.***> wrote:
What does file(1) print for those files?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#10904 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AIEmBKY0lJLhyYRPZ2RV6r8WkSbReQDOks5rVD-ugaJpZM4LowM6>
.
|
Hum, seems to match your system's uname. Not sure why it's not working then. File system mounted noexec, an exec whitelist/blacklist policy, something like that? |
Yeah, it looks totally fine to me as well.
The system is pretty vanilla - no added layers beyond the default, which locally is fairly permissive.
If you'd like, I can replicate the problem in a VM and send that to you or put it somewhere that you could grab it. It would be relatively small, probably about ~1-2G.
…-Adam
On Jan 22, 2017, at 10:37 PM, Ben Noordhuis ***@***.***> wrote:
Hum, seems to match your system's uname. Not sure why it's not working then. File system mounted noexec, an exec whitelist/blacklist policy, something like that?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#10904 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AIEmBOzarXwILOgf9h-Z49wXaUUxHAbIks5rVEqkgaJpZM4LowM6>.
|
@AdamNewman Will you update the node port for OpenBSD, so it's available for everyone, It only has version 6.x, right now |
This issue has been inactive for sufficiently long that it seems like perhaps it should be closed. Feel free to re-open (or leave a comment requesting that it be re-opened) if you disagree. I'm just tidying up and not acting on a super-strong opinion or anything like that. |
I'm trying to compile 8.4.0 on OpenBSD and am running into all kinds of problems too. Should I create a new issue or continue to discuss here? |
@matheusanmo New issue unless you have a strong suspicion that you are facing exactly the same issue as described here. Thanks! |
Same problem here on OpenBSD 6.1. Trying to build after checking out Since this affects both OpenBSD 6.0 and 6.1, I'm wondering if this doesn't have anything to do with pledge(2), which was introduced in OpenBSD 5.9. But other than that, I'm at a loss as to what might be going on here. 😓 |
You get the permission denied stuff because you are building node outside of a wxallowed mount. If you clone the node repo to If you see weird "permission denied" errors, check
|
Oh shit, that would explain everything. 😅 Thank you! (I originally picked the |
Per BUILDING.md I have made sure to install the required "libexecinfo". CXX has been defined as /usr/local/bin/eg++, which is version "4.9.4" from the OpenBSD ports tree.
I've run ./configure which outputs:
I run "gmake" to compile. Everything seems to be fine until the following:
The text was updated successfully, but these errors were encountered: