Comments (32)
Sadly, I know. Still working on the fix.
from process.
Not your fault, didn't think that could be a macro, it's normally a function. Will fix that, do you have a full list of errors?
in the meantime you can just remove the ::
before the sigemptyset
in the headers and it should work.
from process.
Thanks for such a quick reply. The output is right below.
` shm-typed-array@ install /Users/AUser/project/SHMTypedArray
node-gyp rebuild
CXX(target) Release/obj.target/shm/src/gnuipcstub.o
CXX(target) Release/obj.target/shm/src/ipc_conductor.o
In file included from ../src/ipc_conductor.cpp:1:
In file included from ../src/node_shm.h:13:
In file included from /Users/AUser/project/SHMTypedArray/boost/boost/process.hpp:24:
In file included from /Users/AUser/project/SHMTypedArray/boost/boost/process/async_system.hpp:22:
In file included from /Users/AUser/project/SHMTypedArray/boost/boost/process/child.hpp:21:
In file included from /Users/AUser/project/SHMTypedArray/boost/boost/process/detail/child_decl.hpp:30:
/Users/AUser/project/SHMTypedArray/boost/boost/process/detail/posix/wait_for_exit.hpp:60:7: error: expected unqualified-id
::sigemptyset(&sigset);
^
/usr/include/signal.h:125:26: note: expanded from macro 'sigemptyset'
#define sigemptyset(set) ((set) = 0, 0)
^
In file included from ../src/ipc_conductor.cpp:1:
In file included from ../src/node_shm.h:13:
In file included from /Users/AUser/project/SHMTypedArray/boost/boost/process.hpp:24:
In file included from /Users/AUser/project/SHMTypedArray/boost/boost/process/async_system.hpp:22:
In file included from /Users/AUser/project/SHMTypedArray/boost/boost/process/child.hpp:21:
In file included from /Users/AUser/project/SHMTypedArray/boost/boost/process/detail/child_decl.hpp:30:
/Users/AUser/project/SHMTypedArray/boost/boost/process/detail/posix/wait_for_exit.hpp:61:7: error: expected unqualified-id
::sigaddset(&sigset, SIGCHLD);
^
/usr/include/signal.h:122:31: note: expanded from macro 'sigaddset'
#define sigaddset(set, signo) ((set) |= sigbits(signo), 0)
^
In file included from ../src/ipc_conductor.cpp:1:
In file included from ../src/node_shm.h:13:
In file included from /Users/AUser/project/SHMTypedArray/boost/boost/process.hpp:24:
In file included from /Users/AUser/project/SHMTypedArray/boost/boost/process/async_system.hpp:22:
In file included from /Users/AUser/project/SHMTypedArray/boost/boost/process/child.hpp:21:
In file included from /Users/AUser/project/SHMTypedArray/boost/boost/process/detail/child_decl.hpp:30:
/Users/AUser/project/SHMTypedArray/boost/boost/process/detail/posix/wait_for_exit.hpp:87:26: error: no member named 'sigtimedwait' in the global namespace
auto ret_sig = ::sigtimedwait(&sigset, nullptr, &ts);
~~^
In file included from ../src/ipc_conductor.cpp:1:
In file included from ../src/node_shm.h:13:
In file included from /Users/AUser/project/SHMTypedArray/boost/boost/process.hpp:25:
In file included from /Users/AUser/project/SHMTypedArray/boost/boost/process/group.hpp:32:
/Users/AUser/project/SHMTypedArray/boost/boost/process/detail/posix/wait_group.hpp:64:7: error: expected unqualified-id
::sigemptyset(&sigset);
^
/usr/include/signal.h:125:26: note: expanded from macro 'sigemptyset'
#define sigemptyset(set) ((set) = 0, 0)
^
In file included from ../src/ipc_conductor.cpp:1:
In file included from ../src/node_shm.h:13:
In file included from /Users/AUser/project/SHMTypedArray/boost/boost/process.hpp:25:
In file included from /Users/AUser/project/SHMTypedArray/boost/boost/process/group.hpp:32:
/Users/AUser/project/SHMTypedArray/boost/boost/process/detail/posix/wait_group.hpp:65:7: error: expected unqualified-id
::sigaddset(&sigset, SIGCHLD);
^
/usr/include/signal.h:122:31: note: expanded from macro 'sigaddset'
#define sigaddset(set, signo) ((set) |= sigbits(signo), 0)
^
In file included from ../src/ipc_conductor.cpp:1:
In file included from ../src/node_shm.h:13:
In file included from /Users/AUser/project/SHMTypedArray/boost/boost/process.hpp:25:
In file included from /Users/AUser/project/SHMTypedArray/boost/boost/process/group.hpp:32:
/Users/AUser/project/SHMTypedArray/boost/boost/process/detail/posix/wait_group.hpp:90:17: error: no member named 'sigtimedwait' in the global namespace
ret = ::sigtimedwait(&sigset, nullptr, &ts);
~~^
../src/ipc_conductor.cpp:181:10: warning: unused variable 'sz_stk' [-Wunused-variable]
auto sz_stk = ipc_index[resId].size();
^
../src/ipc_conductor.cpp:180:10: warning: unused variable 'sz_ref' [-Wunused-variable]
auto sz_ref = ipc_index[resId].top()->use_count();
^
../src/ipc_conductor.cpp:248:10: warning: unused variable 'sz_ref' [-Wunused-variable]
auto sz_ref = ipc_index[resId].top()->use_count();
^
../src/ipc_conductor.cpp:255:14: warning: unused variable 'p' [-Wunused-variable]
uint8_t* p = ipc_index[resId].top()->get<uint8_t>();
^
../src/ipc_conductor.cpp:249:10: warning: unused variable 'sz_stk' [-Wunused-variable]
auto sz_stk = ipc_index_[resId].size();
^
5 warnings and 6 errors generated.
make: *** [Release/obj.target/shm/src/ipc_conductor.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: make
failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack at ChildProcess.emit (events.js:182:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:240:12)
gyp ERR! System Darwin 17.7.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/AUser/project/SHMTypedArray
gyp ERR! node -v v10.13.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! shm-typed-array@ install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the shm-typed-array@ install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/AUser/.npm/_logs/2018-11-04T04_54_54_133Z-debug.log
AUsers-MBP:SHMTypedArray user$`
from process.
Hello, @klemens-morgenstern ! how is it going? Any updates?
from process.
I just realized that sigtimedwait
does not exist on OSX, so I have (again) no idea how to solve that, except for letting the thing go into an infinite loop until or create some workaround. That'll sadly take some time.
from process.
Does this mean that your advice above will not help?
from process.
I fear not. Really sorry that made it into release - if you don't use the timed wait functions (wait_for / wait_until) you might just be able to comment them out. That's nothing I can use as a library solution though, obviously. I will see if I can come up with a solution.
from process.
Actually I do not use them. I use boost::interprocess but it depends on boost::process in some way and at least in 1.68. I got my module built and working with 1.66.0. So this is not critical issue to me. And I understand that bugs appear time to time... Have a good luck! And thank you for what you are doing.
from process.
boost::interprocess
should not depend on boost::process
, at least that would be a change to it I am not aware off. Will keep the issue around until fixed.
from process.
Should I create an issue in boost::interprocess to mention this?
from process.
According to you compiler output you include it yourself in node_shm.h:13
, and not through interprocess
.
from process.
Yep... you are definitely right... :-)
from process.
So... finally boost::interprocess
does not depend on boost::process
in any way. I used to include boost::brocess for the only thing boost::this_process::get_id();
from process.
Ah ok, well glad your problem is solved, I still need to find a fix for that. Thanks for reporting!
from process.
The macro sigemptyset
is still a problem in 1.69 according to @HowardHinnant.
from process.
Turns out that MacOS isn't the only platform that defines sigemptyset
, sigaddset
. That is an easy fix since all you need to do is drop the ::
qualifier. As for the sigtimedwait
, that too isn't common on all platforms. Strangely, stripping the ::
qualifier from that one gets the code to compile. I am guessing that template is never instantiated so the fact the method does not exits isn't causing us problems.
I can supply a patch but it is nothing more than stripping ::
from those 3 identifiers.
from process.
Never mind, I see you have fixes for this in the develop branch already.
from process.
So can this issue be closed?
from process.
Up to you :)
from process.
Sorry this question was not addressed to me as I see...
from process.
@klemens-morgenstern While I haven't tested your current changes I think you are good to close this. It can always be reopened if the issues persist after the next release.
from process.
I'm also getting this when compiling some boost::asio stuff on 1.69.0. What commit is this fixed in (I'm guessing it's post-1.69.0...)?
from process.
I tried stripping the ::
as suggested in #55 (comment) - however, it's still failing for me with undeclared identifier sigtimedwait
.
from process.
I think I found it - looks like 03cba8f is the one where that is fixed. Should I be able to just poke that into my own fork of 1.69.0, or are there more changes that the fix is dependent upon?
from process.
You should be able to just poke that into 1.69. Will be in 1.70.
from process.
So - it looks like there are still some issues with this fix on macOS. Here is what I'm seeing:
- Building with boost 1.69.0, libs/process set to c3b707b (what shipped in 1.69.0)
- ASIO-related code fails to compile with the unqualified-id (as described in this bug)
- Building with boost 1.69.0, libs/process set to 03cba8f (suggested fix from this bug)
- ASIO-related code compiles, but running unit tests (using boost::test) seem to spawn a TON of child processes (appears to be one per test suite in my codebase) - which never exit even though the main unit test process does exit.
- Building with boost 1.69.0, libs/process set to e2e2b5d (current
master
branch of this repo)- ASIO-related code compiles, but running unit tests (using boost::test) still spawns the child processes which never exit (same behavior as the previous case).
- Building with boost 1.69.0, libs/process set to 44162ec (what shipped in 1.68.0)
- ASIO-related code compiles, and unit tests build and run as expected.
Again - this is on macOS specifically. I am willing to log the unit test issue as a separate bug - but don't know if I should log it here (the boostorg/process repo), or the upstream project (the klemens-morgenstern/boost-process repo)? I'm also willing to try grabbing some version of boost::process
and just trying it to see if it works or not...but there appear to be a lot of different branches and repos involved (so I don't know what to attempt to test against).
Any guidance would be appreciated as to how/where to reproduce and report the bug against. I'm a bit lost as to how/what is going on, because I don't ever in my code (directly) use boost::process
- but I'm seeing side effects of this issue in both boost::asio
and boost::test
.
from process.
I'm also facing the same issue in 1.69 under OSX . Now have to roll back to some early versions.
from process.
@toonetown Sry, I missed the notifications for your comment.
The compile issues should be fixed by now (post 1.69), I stil heard reports of runtime-errors, i.e. the wait_for
and wait_until
functions not working. I set up a OSX test on travis, so I hope to avoid mistakes like that in the future.
from process.
The unit test hang is still happening in 1.70.0. (It does appear to happen with the wait_for
call)
from process.
@klemens-morgenstern
After some trial-and-error investigation, I think I was able to get it to work by replacing the -15
with SIGTERM
in both detail/posix/wait_for_exit.hpp
and detail/posix/wait_group.hpp
.
On macOS, at least, SIGTERM
is defined as 15
, not -15
.
I can put up a PR if you can tell me which repo to submit it against.
from process.
@toonetown thanks, against klemens-morgenstern/boost-process would be awesome, since that got all the CI setup.
from process.
Boost 1.70 not yet available on brew (always 1.69)
Very blocking trouble :(
from process.
Related Issues (20)
- Missing dependency on scope_exit with CMake build
- bp::environment::native_handle() cannot be compiled on Linux HOT 1
- Including boost/process.hpp causes build failure on Windows HOT 8
- [v2] Using async_execute with bind_cancellation_slot HOT 7
- Is it a typo mistake for "tempalte" in environment.hpp ?
- clang-15 error: expected unqualified-id due to dirfd macro in macOS 14 SDK
- clang-10 warning: comparison of integers of different signs: 'typename iterator_traits<__wrap_iter<char *> >::difference_type' (aka 'long') and 'const std::size_t' (aka 'const unsigned long')
- [Linux] boost::process:: child ::wait_until is not thread-safe HOT 6
- Boost CMake testing procedure doesn't work for Process
- [v2][Linux] process_is_running() returns false with musl libc
- boost\process\pipe.hpp(132,5): warning C4297: 'boost::process::basic_pipebuf<char,std::char_traits<char>>::~basic_pipebuf': function assumed not to throw an exception but does
- pipe_out leaks pipe source fd when redirecting both stdout and stderr to same pipe
- Modular Boost C++ Libraries Request HOT 1
- `child::terminate()` result in ECHILD in `on_exit` since boost 1.78 including 1.84
- include process v2 header file cause compile failed in aix platfrom
- Compilation error 'process\v2\environment.hpp' value::operator=( const Source& source )
- is it possible to add the ability for boost::process::child to support the execution of commands by specified users? HOT 3
- Linux and windows behave differently HOT 2
- limit_handles object not thread-safe
- v1.81: boost\process\detail\windows\environment.hpp reports a compilation error in Windows wide-byte environment
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from process.