[MacPorts] #54068: mozjs17 @17.0.0_5 won't build (on PPC Tiger, Mac OS X 10.4.11) because sys/sysctl.h does not provide _SC_NPROCESSORS_ONLN but HW_NCPU

MacPorts noreply at macports.org
Sun Apr 30 21:20:12 UTC 2017


#54068: mozjs17  @17.0.0_5 won't build (on PPC Tiger, Mac OS X 10.4.11) because
sys/sysctl.h does not provide _SC_NPROCESSORS_ONLN but HW_NCPU
-----------------------+---------------------
 Reporter:  ballapete  |      Owner:
     Type:  defect     |     Status:  new
 Priority:  Normal     |  Milestone:
Component:  ports      |    Version:  2.4.1
 Keywords:             |       Port:  mozjs17
-----------------------+---------------------
 {{{
 jsgc.cpp
 /opt/local/bin/g++-apple-4.2 -o jsgc.o -c  -I./dist/system_wrappers_js
 -include ./config/gcc_hidden.h -DIMPL_MFBT -DEXPORT_JS_API
 -DNO_NSPR_10_SUPPORT -DUSE_ZLIB -I./../../mfbt/double-conversion -I. -I.
 -I./dist/include  -I/opt/local/include/nspr      -I. -I./assembler
 -I./yarr  -fPIC -I/opt/local/include -Wall -Wpointer-arith -Woverloaded-
 virtual -Werror=return-type -Wempty-body -Wno-ctor-dtor-privacy -Wno-
 overlength-strings -Wno-invalid-offsetof -Wno-variadic-macros -Wcast-align
 -pipe -Os -arch ppc -fno-common -fno-rtti -ffunction-sections -fdata-
 sections -fno-exceptions -pthread -pipe  -DNDEBUG -DTRIMMED -g -O3 -fno-
 stack-protector -fomit-frame-pointer -DUSE_SYSTEM_MALLOC=1
 -DENABLE_ASSEMBLER=1  -I/opt/local/include -DMOZILLA_CLIENT -include ./js-
 confdefs.h -MD -MF .deps/jsgc.o.pp
 /opt/local/var/macports/build/_opt_local_var_macports_sources_lil.fr.rsync.macports.org_release_tarballs_ports_lang_mozjs17/mozjs17/work/mozjs17.0.0/js/src/jsgc.cpp
 /opt/local/var/macports/build/_opt_local_var_macports_sources_lil.fr.rsync.macports.org_release_tarballs_ports_lang_mozjs17/mozjs17/work/mozjs17.0.0/js/src/jsgc.cpp:
 In function 'unsigned int js::GetCPUCount()':
 /opt/local/var/macports/build/_opt_local_var_macports_sources_lil.fr.rsync.macports.org_release_tarballs_ports_lang_mozjs17/mozjs17/work/mozjs17.0.0/js/src/jsgc.cpp:2868:
 error: '_SC_NPROCESSORS_ONLN' was not declared in this scope
 gmake[1]: *** [config/rules.mk:1019: jsgc.o] Error 1
 gmake[1]: Leaving directory
 '/opt/local/var/macports/build/_opt_local_var_macports_sources_lil.fr.rsync.macports.org_release_tarballs_ports_lang_mozjs17/mozjs17/work/mozjs17.0.0/js/src'
 }}}

 The bug is here:

 {{{
  2858   static unsigned
  2859   GetCPUCount()
  2860   {
  2861       static unsigned ncpus = 0;
  2862       if (ncpus == 0) {
  2863   # ifdef XP_WIN
  2864           SYSTEM_INFO sysinfo;
  2865           GetSystemInfo(&sysinfo);
  2866           ncpus = unsigned(sysinfo.dwNumberOfProcessors);
  2867   # else
  2868           long n = sysconf(_SC_NPROCESSORS_ONLN);
  2869           ncpus = (n > 0) ? unsigned(n) : 1;
  2870   # endif
  2871       }
  2872       return ncpus;
  2873   }
  2874   #endif /* JS_THREADSAFE */
 }}}

--
Ticket URL: <https://trac.macports.org/ticket/54068>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list