Skip to content

Fork error on tvOS and watchOS #3334

@paulocoutinhox

Description

@paulocoutinhox

Hi,

When i try build version 1.10.1 for tvOS i get this error:

In file included from /Users/paulo/.conan/data/poco/1.10.1/_/_/build/38267c8c71293c0f1dfff4a217e3a33b60e9b7fd/source_subfolder/Foundation/src/Process.cpp:59:
/Users/paulo/.conan/data/poco/1.10.1/_/_/build/38267c8c71293c0f1dfff4a217e3a33b60e9b7fd/source_subfolder/Foundation/src/Process_UNIX.cpp:190:12: error: 'fork' is unavailable: not available on tvOS
        int pid = fork();
                  ^
/Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS14.5.sdk/usr/include/unistd.h:447:8: note: 'fork' has been explicitly marked unavailable here
pid_t    fork(void) __WATCHOS_PROHIBITED __TVOS_PROHIBITED;
         ^
In file included from /Users/paulo/.conan/data/poco/1.10.1/_/_/build/38267c8c71293c0f1dfff4a217e3a33b60e9b7fd/source_subfolder/Foundation/src/Process.cpp:59:
/Users/paulo/.conan/data/poco/1.10.1/_/_/build/38267c8c71293c0f1dfff4a217e3a33b60e9b7fd/source_subfolder/Foundation/src/Process_UNIX.cpp:231:3: error: 'execvp' is unavailable: not available on tvOS
                execvp(argv[0], &argv[0]);
                ^
/Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS14.5.sdk/usr/include/unistd.h:446:6: note: 'execvp' has been explicitly marked unavailable here
int      execvp(const char * __file, char * const * __argv) __WATCHOS_PROHIBITED __TVOS_PROHIBITED;
      

I see that is in this line:
https://github.com/pocoproject/poco/blob/poco-1.10.1/Foundation/src/Process_UNIX.cpp#L190

And a define is checked is this line:
https://github.com/pocoproject/poco/blob/poco-1.10.1/Foundation/src/Process_UNIX.cpp#L175

I need add in conan a variable to pass this directive, correct?

Thanks.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions