Compilation problem on Solaris 11 on flock use
Hello,
Trying to compile stress-ng on recent Solaris 11 system using gcc, I get this error message:
[...]
stress-dentry.c: In function ‘stress_
stress-
ret = flock(fd, LOCK_EX);
^
stress-
ret = flock(fd, LOCK_EX);
^
stress-
stress-
ret = flock(fd, LOCK_UN);
gmake[1]: *** [stress-dentry.o] Error 1
gmake[1]: Leaving directory `/tmp/stress-
gmake: *** [all_config] Error 2
I think this post may be of help regarding this issue: https:/
Or did I made something wrong?
Thank you.
--
best regards,
Julien Gabel.
Question information
- Language:
- English Edit question
- Status:
- Answered
- For:
- Ubuntu stress-ng Edit question
- Assignee:
- No assignee Edit question
- Last query:
- 2018-07-20
- Last reply:
- 2018-07-20
Solaris isn't supported here. You want a Solaris forum
Julien Gabel (julien.gabel) said : | #2 |
Hi,
The documentation says it is expected to run on Solaris. Hence, it have to be build first.
The provided README says:
[...]
To build on SunOS, one requires GCC and GNU make, build using:
CC=gcc gmake clean
CC=gcc gmake
[...]
And I did exactly that. But the fact is, the syscall flock i s not supported on Solarish systems.
A proper, and more portable, syscall for those systems seems to be fcntl (as explained by the proposed link in my initial message).
BTW, it is not a Solaris problem per-se, but the fact that a syscall is used where not available on all platform.
I found no check code for that in the test programs, nor no ifdef for managing particular cases (for other OSes for example).
Last, the fix/workaround is well to be changed in code of stress-ng itself, nothing on Solaris side I would say--especially since it is supposed to run on it.
I just think I would have to find another tool for our stress tests.
Anyway thank you answering me.
--
Best regards,
Julien Gabel.
You are using Solaris. Solaris isn't supported here. There are many distribution agnostic forums which support lots of distributions. This is Ubuntu only.
Julien Gabel (julien.gabel) said : | #4 |
Hi,
OK, so, sorry for the noise.
BTW, the official page for stress-ng (http://
"For bug reports, visit: Stress-ng at LaunchPad (https:/
So, can someone please kindly redirect me to a not Ubuntu-only site regarding strees-ng maybe? Thank you in advance.
--
Best regards,
Julien Gabel.
Manfred Hampl (m-hampl) said : | #5 |
Maybe you could try contacting http://
Julien Gabel (julien.gabel) said : | #6 |
Hi,
OK, I will do that. Thank you for your answer.
--
Best regards,
Julien Gabel.
Colin Ian King (colin-king) said : | #7 |
I've pushed a fix to hopefully work around this for Solaris 11, please pull the fix and see if it helps.
http://
Colin
Julien Gabel (julien.gabel) said : | #8 |
Hi,
I tested with the "exclusion", and it now ends building the stress-ng binary. FYI, and FYI-only, here are some warnings I got (and which can be investigated later _if necessary_):
[...]
CC stress-fork.c
stress-fork.c: In function ‘stress_vfork’:
stress-
return stress_
^
In file included from stress-ng.h:46:0,
/usr/include/
extern pid_t vfork(void) __ATTR_DEPRECATED;
^
[...]
CC stress-open.c
grep: illegal option -- e
Usage: grep [-c|-l|-q] -bhinsvw pattern file . . .
CC stress-
[...]
[...]
CC stress-vforkmany.c
stress-vforkmany.c: In function ‘stress_vforkmany’:
stress-
pid = vfork();
^
In file included from stress-ng.h:46:0,
/usr/include/
extern pid_t vfork(void) __ATTR_DEPRECATED;
^
[...]
Anyway, I now have a working stress-ng to test/play with. Thank you very much.
--
Best regards,
Julien Gabel.
Can you help with this problem?
Provide an answer of your own, or ask Julien Gabel for more information if necessary.