I was looking at running netperf to run some basic network performance benchmarks but I ran into the following problem trying to compile it:
# make ...removed output... if gcc -DHAVE_CONFIG_H -I. -I. -I.. -g -O2 -MT netlib.o -MD -MP -MF ".deps/netlib.Tpo" \ -c -o netlib.o `test -f 'netlib.c' || echo './'`netlib.c; \ then mv -f ".deps/netlib.Tpo" ".deps/netlib.Po"; \ else rm -f ".deps/netlib.Tpo"; exit 1; \ fi netlib.c:70:18: math.h: No such file or directory ...removed output...
Frankly, I thought math.h would just be there on the system, but after checking /usr/include it was not! ls /usr/include/math* returned nothing. However, I got the following clue I needed to install system/library/math/header-math by running:
# pkg list -a | grep -i math system/library/math 0.5.11-0.151.0.1 installed ----- system/library/math/header-math 0.5.11-0.151.0.1 known -----
The header-math is known but not installed, so after performing the install of header-math:
# pkg install header-math Packages to install: 1 Create boot environment: No DOWNLOAD PKGS FILES XFER (MB) Completed 1/1 16/16 0.0/0.0 PHASE ACTIONS Install Phase 38/38 PHASE ITEMS Package State Update Phase 1/1 Image State Update Phase 2/2 PHASE ITEMS Reading Existing Index 8/8 Indexing Packages 1/1
math.h was present on the system:
# ls /usr/include/math* /usr/include/math.h
and my make completed without errors!
# make make all-recursive ...removed output... if gcc -DHAVE_CONFIG_H -I. -I. -I.. -g -O2 -MT netlib.o -MD -MP -MF ".deps/netlib.Tpo" \ -c -o netlib.o `test -f 'netlib.c' || echo './'`netlib.c; \ then mv -f ".deps/netlib.Tpo" ".deps/netlib.Po"; \ else rm -f ".deps/netlib.Tpo"; exit 1; \ fi if gcc -DHAVE_CONFIG_H -I. -I. -I.. -g -O2 -MT netsh.o -MD -MP -MF ".deps/netsh.Tpo" \ -c -o netsh.o `test -f 'netsh.c' || echo './'`netsh.c; \ then mv -f ".deps/netsh.Tpo" ".deps/netsh.Po"; \ else rm -f ".deps/netsh.Tpo"; exit 1; \ fi if gcc -DHAVE_CONFIG_H -I. -I. -I.. -g -O2 -MT nettest_bsd.o -MD -MP -MF ".deps/nettest_bsd.Tpo" \ -c -o nettest_bsd.o `test -f 'nettest_bsd.c' || echo './'`nettest_bsd.c; \ then mv -f ".deps/nettest_bsd.Tpo" ".deps/nettest_bsd.Po"; \ else rm -f ".deps/nettest_bsd.Tpo"; exit 1; \ ...output removed... gcc -g -O2 -o netserver netserver.o netlib.o netsh.o nettest_bsd.o nettest_dlpi.o nettest_unix.o nettest_xti.o nettest_sctp.o nettest_sdp.o nettest_omn i.o net_uuid.o netcpu_kstat10.o netrt_rtmget.o netdrv_solaris.o netslot_solaris.o netsys_solaris.o netsec_none.o -lsmbios -ldevinfo -lkstat -lsendfile -ln sl -lsocket -lm make[3]: Leaving directory `/tmp/netperf-2.4.5/src' make[2]: Leaving directory `/tmp/netperf-2.4.5/src' Making all in doc make[2]: Entering directory `/tmp/netperf-2.4.5/doc' Making all in examples ...output removed... # make install ...output removed...
Thank you for pointing me to header-math package.
It helped me to compile libevent-2.0.11 on Openindiana b148
Hi HueponiK,
Glad to hear this post helped you with your compilations!
Regards,
-swinful
Pingback: [Solaris 11 Express] math.h: No such file or directory « Tulsa Labs
Pingback: solaris下编译php | 阿玖博客
this is a welcome post 🙂
I’m just learning Solaris and wanted to compile apcusbd but bumped into this error..
you really helped me out, thanks a lot!
Thank you! Helped me compile irssi-silc on openindiana b151.
Thanks for this! I got stuck here, trying to compile transmission in openindiana.
Another big THANK YOU!!!
As another Solaris noob attempting to get a rvm/ruby stack up and running this was very confusing at first.
THANK YOU THANK YOU!
Hi Andrew,
Great to hear!
Best Regards,
-swinful
I am getting similar error for random.h …can anyone help me out. pls
Vikas,
Is there an application you are trying to use/compile that is looking for random.h? If, so can you give more details of what the error is or what you have tried?
Thanks,
-swinful
its done ….thanks for your reply. I included the path where THE FILE WAS PRESENT
Cool. Thanks for visiting! -:)
saved my ass building libevent. thanks a bunch
This tip let me get Netatalk 3 built on OpenIndiana 151a5. Thank you! http://hardforum.com/showthread.php?t=1707996
Hi,
Very glad to hear!!
Cheers,
-swinful
Thanks a tonne for posting this solution on the forum! Does great service to us newbies..
Excellent! Great to hear!
-swinful
Excellent – thank you!!
Awesome source of info mate. Like the post.