Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

glu_experimental: build fails on PPC: error: '_SC_PHYS_PAGES' undeclared etc. #1258

Open
barracuda156 opened this issue Jan 19, 2023 · 3 comments
Labels
is:bug Something looks wrong. plat:apple This is related to the Apple compllers/build system

Comments

@barracuda156
Copy link

barracuda156 commented Jan 19, 2023

This issue is specific to glu_experimental branch (which I need for HiOp back-end):

/opt/local/var/macports/build/_opt_PPCRosettaPorts_math_ginkgo/ginkgo-glu/work/ginkgo-e234eab1bd7afe85dd594638e291a2caf464bfb1/third_party/glu/src/nicslu/source/system.c: In function 'GetSystemMemory':
/opt/local/var/macports/build/_opt_PPCRosettaPorts_math_ginkgo/ginkgo-glu/work/ginkgo-e234eab1bd7afe85dd594638e291a2caf464bfb1/third_party/glu/src/nicslu/source/system.c:166:25: error: '_SC_PHYS_PAGES' undeclared (first use in this function)
  166 |         *phys = sysconf(_SC_PHYS_PAGES) * page_size;
      |                         ^~~~~~~~~~~~~~
/opt/local/var/macports/build/_opt_PPCRosettaPorts_math_ginkgo/ginkgo-glu/work/ginkgo-e234eab1bd7afe85dd594638e291a2caf464bfb1/third_party/glu/src/nicslu/source/system.c:166:25: note: each undeclared identifier is reported only once for each function it appears in
/opt/local/var/macports/build/_opt_PPCRosettaPorts_math_ginkgo/ginkgo-glu/work/ginkgo-e234eab1bd7afe85dd594638e291a2caf464bfb1/third_party/glu/src/nicslu/source/system.c:167:30: error: '_SC_AVPHYS_PAGES' undeclared (first use in this function)
  167 |         *availphys = sysconf(_SC_AVPHYS_PAGES) * page_size;
      |                              ^~~~~~~~~~~~~~~~
/opt/local/var/macports/build/_opt_PPCRosettaPorts_math_ginkgo/ginkgo-glu/work/ginkgo-e234eab1bd7afe85dd594638e291a2caf464bfb1/third_party/glu/src/nicslu/source/thread.c: In function '_BindThreadToCores':
/opt/local/var/macports/build/_opt_PPCRosettaPorts_math_ginkgo/ginkgo-glu/work/ginkgo-e234eab1bd7afe85dd594638e291a2caf464bfb1/third_party/glu/src/nicslu/source/thread.c:270:9: error: unknown type name 'cpu_set_t'
  270 |         cpu_set_t set;
      |         ^~~~~~~~~
make[2]: *** [third_party/glu/src/nicslu/lib/CMakeFiles/nicslu.dir/__/source/system.c.o] Error 1

/opt/local/var/macports/build/_opt_PPCRosettaPorts_math_ginkgo/ginkgo-glu/work/ginkgo-e234eab1bd7afe85dd594638e291a2caf464bfb1/third_party/glu/src/nicslu/source/timer_c.c:59:30: note: each undeclared identifier is reported only once for each function it appears in
/opt/local/var/macports/build/_opt_PPCRosettaPorts_math_ginkgo/ginkgo-glu/work/ginkgo-e234eab1bd7afe85dd594638e291a2caf464bfb1/third_party/glu/src/nicslu/source/thread.c:282:27: error: 'CPU_SETSIZE' undeclared (first use in this function); did you mean 'FD_SETSIZE'?
  282 |                 if (c+1 < CPU_SETSIZE)
      |                           ^~~~~~~~~~~
      |                           FD_SETSIZE
@barracuda156
Copy link
Author

Apparently _SC_PHYS_PAGES is not there on Mac in general:
https://stackoverflow.com/questions/30511579/linux-sc-phys-pages-not-working-on-mac-os-x

@upsj
Copy link
Member

upsj commented Jan 20, 2023

glu_experimental will hopefully be replaced by develop soon, so we probably won't be able to spend any time addressing this directly.

@barracuda156
Copy link
Author

@upsj Got it, no issues. I will wait till updated devel is out, and try building again.

@pratikvn pratikvn added is:bug Something looks wrong. plat:apple This is related to the Apple compllers/build system labels Mar 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
is:bug Something looks wrong. plat:apple This is related to the Apple compllers/build system
Projects
None yet
Development

No branches or pull requests

3 participants