View Issue Details

IDProjectCategoryView StatusLast Update
0001878XdebugInstallationpublic2020-11-14 16:15
Reporterrjung Assigned To 
PrioritynormalSeverityblockReproducibilityalways
Status closedResolutionfixed 
Product Version3.0.0beta1 
Target Version3.0.0RC1Fixed in Version3.0.0RC1 
Summary0001878: Compilation failure: Socket options TCP_KEEPCNT and TCP_KEEPINTVL do not exist on Solaris 10 Sparc
Description

Socket options TCP_KEEPCNT and TCP_KEEPINTVL do not exist on Solaris 10 Sparc, so compilation fails in src/debugger.com.c due to their use in the following lines:

   ret = setsockopt(fd, SOL_TCP, TCP_KEEPCNT, &optval, optlen);

...
ret = setsockopt(fd, SOL_TCP, TCP_KEEPINTVL, &optval, optlen);

AFAIK there's no replacement one could use, but it is probably safe to simply not set the options, if the respective flag is not defined.

The same problem also occurs on the 2.9 branch.

Something like the following should work:


--- src/debugger/com.c 2020-09-28 12:24:43.000000000 +0000
+++ src/debugger/com.c 2020-11-05 16:53:47.250586515 +0000
@@ -111,17 +111,21 @@
return;
}

+#if defined(TCP_KEEPCNT)
optval = 20;
ret = setsockopt(fd, SOL_TCP, TCP_KEEPCNT, &optval, optlen);
if (ret) {
return;
}
+#endif

+#if defined(TCP_KEEPINTVL)
optval = 60;
ret = setsockopt(fd, SOL_TCP, TCP_KEEPINTVL, &optval, optlen);
if (ret) {
return;
}
+#endif
}
#endif

Thanks and regards,

Rainer

Tagscompilation, Solaris
Operating System
PHP Version7.4.0-7.4.4

Activities

derick

2020-11-05 16:38

administrator   ~0005503

Could you profile the compiler errors (as an attachment) please?

derick

2020-11-11 10:16

administrator   ~0005513

https://github.com/xdebug/xdebug/pull/682

derick

2020-11-11 12:36

administrator   ~0005515

Fixed for 3.0.0beta2 — It is also in the xdebug_2_9 branch, but I do not expect a further release from that branch. Thanks for the report!