[jira] [Commented] (DAEMON-463) Daemon fails to build on macOS with XCode 15.3

2024-05-14 Thread Michael Osipov (Jira)


[ 
https://issues.apache.org/jira/browse/DAEMON-463?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17846213#comment-17846213
 ] 

Michael Osipov commented on DAEMON-463:
---

FYI: https://github.com/apache/commons-daemon/pull/170

> Daemon fails to build on macOS with XCode 15.3
> --
>
> Key: DAEMON-463
> URL: https://issues.apache.org/jira/browse/DAEMON-463
> Project: Commons Daemon
>  Issue Type: Bug
>  Components: Jsvc
>Affects Versions: 1.3.4
> Environment:  
> Clang: 15.0.0 build 1500
> macOS: 14.4.1-arm64 
> CLT: 15.3.0.0.1.1708646388 
> Xcode: 15.3 
> Rosetta 2: false
>Reporter: Sean Molenaar
>Assignee: Michael Osipov
>Priority: Major
> Fix For: 1.4.0
>
>
> When building jsvc on macOS with XCode 15.3 (for Homebrew), the build fails 
> with the following error:
>  
> {code:java}
>  jsvc-unix.c:1311:20: error: incompatible function pointer types assigning to 
> 'void (*)(int)' from 'void (int, siginfo_t *, void *)' (aka 'void (int, 
> struct __siginfo *, void *)') [-Wincompatible-function-pointer-types]90  
> act.sa_handler = controller;91  ^ ~~ {code}
>  
> For more details see: 
> https://github.com/Homebrew/homebrew-core/actions/runs/8967899390/job/24626304630
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (DAEMON-463) Daemon fails to build on macOS with XCode 15.3

2024-05-10 Thread Michael Osipov (Jira)


[ 
https://issues.apache.org/jira/browse/DAEMON-463?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17845282#comment-17845282
 ] 

Michael Osipov commented on DAEMON-463:
---

Looking at the definition of {{siginfo_t}} from 
https://pubs.opengroup.org/onlinepubs/009696699/basedefs/signal.h.html we 
already use {{si_pid}} from the extended runtime code, so maybe it is already 
safe to use it?

> Daemon fails to build on macOS with XCode 15.3
> --
>
> Key: DAEMON-463
> URL: https://issues.apache.org/jira/browse/DAEMON-463
> Project: Commons Daemon
>  Issue Type: Bug
>  Components: Jsvc
>Affects Versions: 1.3.4
> Environment:  
> Clang: 15.0.0 build 1500
> macOS: 14.4.1-arm64 
> CLT: 15.3.0.0.1.1708646388 
> Xcode: 15.3 
> Rosetta 2: false
>Reporter: Sean Molenaar
>Priority: Major
>
> When building jsvc on macOS with XCode 15.3 (for Homebrew), the build fails 
> with the following error:
>  
> {code:java}
>  jsvc-unix.c:1311:20: error: incompatible function pointer types assigning to 
> 'void (*)(int)' from 'void (int, siginfo_t *, void *)' (aka 'void (int, 
> struct __siginfo *, void *)') [-Wincompatible-function-pointer-types]90  
> act.sa_handler = controller;91  ^ ~~ {code}
>  
> For more details see: 
> https://github.com/Homebrew/homebrew-core/actions/runs/8967899390/job/24626304630
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (DAEMON-463) Daemon fails to build on macOS with XCode 15.3

2024-05-10 Thread Michael Osipov (Jira)


[ 
https://issues.apache.org/jira/browse/DAEMON-463?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17845281#comment-17845281
 ] 

Michael Osipov commented on DAEMON-463:
---

This does work:
{noformat}
$ git diff
diff --git a/src/native/unix/native/jsvc-unix.c 
b/src/native/unix/native/jsvc-unix.c
index e331a0f..187e404 100644
--- a/src/native/unix/native/jsvc-unix.c
+++ b/src/native/unix/native/jsvc-unix.c
@@ -1308,7 +1308,7 @@ static int run_controller(arg_data *args, home_data 
*data, uid_t uid, gid_t gid)
  * These will be replaced in the child process.
  */
 memset(, '\0', sizeof(act));
-act.sa_handler = controller;
+act.sa_sigaction = controller;
 sigemptyset(_mask);
 act.sa_flags = SA_RESTART | SA_NOCLDSTOP | SA_SIGINFO;
 {noformat}
but I have no clue how to test/comply with: If the SA_SIGINFO flag is set in 
the sa_flags field, and the implementation supports the Realtime Signals 
Extension option or the XSI Extension option, the sa_sigaction field specifies 
a signal-catching function. [Option End]
from https://pubs.opengroup.org/onlinepubs/009696699/functions/sigaction.html

> Daemon fails to build on macOS with XCode 15.3
> --
>
> Key: DAEMON-463
> URL: https://issues.apache.org/jira/browse/DAEMON-463
> Project: Commons Daemon
>  Issue Type: Bug
>  Components: Jsvc
>Affects Versions: 1.3.4
> Environment:  
> Clang: 15.0.0 build 1500
> macOS: 14.4.1-arm64 
> CLT: 15.3.0.0.1.1708646388 
> Xcode: 15.3 
> Rosetta 2: false
>Reporter: Sean Molenaar
>Priority: Major
>
> When building jsvc on macOS with XCode 15.3 (for Homebrew), the build fails 
> with the following error:
>  
> {code:java}
>  jsvc-unix.c:1311:20: error: incompatible function pointer types assigning to 
> 'void (*)(int)' from 'void (int, siginfo_t *, void *)' (aka 'void (int, 
> struct __siginfo *, void *)') [-Wincompatible-function-pointer-types]90  
> act.sa_handler = controller;91  ^ ~~ {code}
>  
> For more details see: 
> https://github.com/Homebrew/homebrew-core/actions/runs/8967899390/job/24626304630
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (DAEMON-463) Daemon fails to build on macOS with XCode 15.3

2024-05-10 Thread Michael Osipov (Jira)


[ 
https://issues.apache.org/jira/browse/DAEMON-463?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17845280#comment-17845280
 ] 

Michael Osipov commented on DAEMON-463:
---

Temporary fix: 
https://github.com/freebsd/freebsd-ports/blob/e8c3e827f61838b8bd8509e3d4a6d39dfbadfdd1/devel/apache-commons-daemon/Makefile#L32-L34

> Daemon fails to build on macOS with XCode 15.3
> --
>
> Key: DAEMON-463
> URL: https://issues.apache.org/jira/browse/DAEMON-463
> Project: Commons Daemon
>  Issue Type: Bug
>  Components: Jsvc
>Affects Versions: 1.3.4
> Environment:  
> Clang: 15.0.0 build 1500
> macOS: 14.4.1-arm64 
> CLT: 15.3.0.0.1.1708646388 
> Xcode: 15.3 
> Rosetta 2: false
>Reporter: Sean Molenaar
>Priority: Major
>
> When building jsvc on macOS with XCode 15.3 (for Homebrew), the build fails 
> with the following error:
>  
> {code:java}
>  jsvc-unix.c:1311:20: error: incompatible function pointer types assigning to 
> 'void (*)(int)' from 'void (int, siginfo_t *, void *)' (aka 'void (int, 
> struct __siginfo *, void *)') [-Wincompatible-function-pointer-types]90  
> act.sa_handler = controller;91  ^ ~~ {code}
>  
> For more details see: 
> https://github.com/Homebrew/homebrew-core/actions/runs/8967899390/job/24626304630
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (DAEMON-463) Daemon fails to build on macOS with XCode 15.3

2024-05-10 Thread Michael Osipov (Jira)


[ 
https://issues.apache.org/jira/browse/DAEMON-463?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17845279#comment-17845279
 ] 

Michael Osipov commented on DAEMON-463:
---

I can confirm the issue on:
{noformat}
$ make
(cd native; make  all)
cc -g -O2 -DOS_FREEBSD -DDSO_DLFCN -D_THREAD_SAFE -pthread -DCPU=\"amd64\" 
-Wall -Wstrict-prototypes   -I/usr/local/openjdk8/include 
-I/usr/local/openjdk8/include/freebsd -c jsvc-unix.c -o jsvc-unix.o
jsvc-unix.c:1311:20: error: incompatible function pointer types assigning to 
'void (*)(int)' from 'void (int, siginfo_t *, void *)' (aka 'void (int, struct 
__siginfo *, void *)') [-Wincompatible-function-pointer-types]
 1311 | act.sa_handler = controller;
  |^ ~~
1 error generated.
*** Error code 1

Stop.
make[1]: stopped in /tmp/commons-daemon/src/native/unix/native
*** Error code 1

Stop.
make: stopped in /tmp/commons-daemon/src/native/unix
osipovmi@deblndw011x:/tmp/commons-daemon/src/native/unix (master =)
$ cc --version
FreeBSD clang version 17.0.6 (https://github.com/llvm/llvm-project.git 
llvmorg-17.0.6-0-g6009708b4367)
Target: x86_64-unknown-freebsd13.3
Thread model: posix
InstalledDir: /usr/bin
{noformat}

> Daemon fails to build on macOS with XCode 15.3
> --
>
> Key: DAEMON-463
> URL: https://issues.apache.org/jira/browse/DAEMON-463
> Project: Commons Daemon
>  Issue Type: Bug
>  Components: Jsvc
>Affects Versions: 1.3.4
> Environment:  
> Clang: 15.0.0 build 1500
> macOS: 14.4.1-arm64 
> CLT: 15.3.0.0.1.1708646388 
> Xcode: 15.3 
> Rosetta 2: false
>Reporter: Sean Molenaar
>Priority: Major
>
> When building jsvc on macOS with XCode 15.3 (for Homebrew), the build fails 
> with the following error:
>  
> {code:java}
>  jsvc-unix.c:1311:20: error: incompatible function pointer types assigning to 
> 'void (*)(int)' from 'void (int, siginfo_t *, void *)' (aka 'void (int, 
> struct __siginfo *, void *)') [-Wincompatible-function-pointer-types]90  
> act.sa_handler = controller;91  ^ ~~ {code}
>  
> For more details see: 
> https://github.com/Homebrew/homebrew-core/actions/runs/8967899390/job/24626304630
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (DAEMON-463) Daemon fails to build on macOS with XCode 15.3

2024-05-10 Thread Michael Osipov (Jira)


[ 
https://issues.apache.org/jira/browse/DAEMON-463?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17845278#comment-17845278
 ] 

Michael Osipov commented on DAEMON-463:
---

What is the LLVM version here?

> Daemon fails to build on macOS with XCode 15.3
> --
>
> Key: DAEMON-463
> URL: https://issues.apache.org/jira/browse/DAEMON-463
> Project: Commons Daemon
>  Issue Type: Bug
>  Components: Jsvc
>Affects Versions: 1.3.4
> Environment:  
> Clang: 15.0.0 build 1500
> macOS: 14.4.1-arm64 
> CLT: 15.3.0.0.1.1708646388 
> Xcode: 15.3 
> Rosetta 2: false
>Reporter: Sean Molenaar
>Priority: Major
>
> When building jsvc on macOS with XCode 15.3 (for Homebrew), the build fails 
> with the following error:
>  
> {code:java}
>  jsvc-unix.c:1311:20: error: incompatible function pointer types assigning to 
> 'void (*)(int)' from 'void (int, siginfo_t *, void *)' (aka 'void (int, 
> struct __siginfo *, void *)') [-Wincompatible-function-pointer-types]90  
> act.sa_handler = controller;91  ^ ~~ {code}
>  
> For more details see: 
> https://github.com/Homebrew/homebrew-core/actions/runs/8967899390/job/24626304630
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)