I’ve been compiling Asterisk on Solaris 11.1 (x86) using gcc.
With 11.5.0 and with 11.7.0rc1, I have to edit the main/Makefile generated by configure to remove -Wl,–version-script,libasteriskssl.exports,–warn-common from the line defining SO_SUPPRESS_SYMBOLS
Not sure if someone knows what’s going on here and how to update the code so it produces a working makefile (sorry, beyond my skills, but I thought if I don’t share, no-one’s going to know there’s even an issue).
I’m running configure thus:
./configure --prefix=/opt/asterisk --sysconfdir=/etc/opt
Compiling 12.0.0beta2 currently fails thus:
[CC] stasis_recording/stored.c -> stasis_recording/stored.o
stasis_recording/stored.c: In function ‘scan’:
stasis_recording/stored.c:354:15: error: ‘struct dirent’ has no member named 'd_type’
stasis_recording/stored.c:355:7: error: ‘DT_REG’ undeclared (first use in this function)
stasis_recording/stored.c:355:7: note: each undeclared identifier is reported only once for each function it appears in
stasis_recording/stored.c:359:7: error: ‘DT_DIR’ undeclared (first use in this function)
gmake: *** [stasis_recording/stored.o] Error 1
gmake: *** [res] Error 2
I haven’t investigated this further.
I know it’s ages, but I’ve finally looked at this again.
I’m currently trying to compile 12.8.1 on Solaris 11 (0.5.11-0.175.2.7.0.4.0).
There are two issues, that I can see with the code:
in main/uuid.c use is made of uuid_unparse_lower. That function doesn’t exist on Solaris. By looking at the code, it looks like uuid_unparse would do equally well a job? Perhaps that could be used instead or an #ifdef for Solaris introduced?
Furthermore, the issue with
error: ‘struct dirent’ has no member named 'd_type’
Looking around on google, it appears that d_type should no longer be used even on Linux. Apparently that’s an ancient BSD’ism (I’m reading this, don’t shoot the messenger) and the appropriate thing to use is stat(). Either way, Solaris doesn’t have a d_type in dirent.h.
My coding skills aren’t sufficient to fix this myself, unfortunately.
A quick check reveals that both of these issues are also present in 13.2.0.
Anyone out there happy to do us Solaris users a favour?
Thank you for reporting this issue. I am an Asterisk user and external contributor just like you. Anyway, today, I faced the same issue and reported/patched it: ASTERISK-27933. When it comes to your DT_REG issue, this was fixed as a side-effect of this change…
I fixed several other smaller issues, which should be included in the next Asterisk release. Now, the Asterisk 13 compiles on Oracle Solaris 11.3 here. However, more than compiling has to be done because even the tool menuselect does not start. Not sure, if I find the time to fix that and the runtime, too.
Looks like this has now been fixed in Asterisk 13.13+ (ASTERISK-26509)