Comments (4)
Yeah, those two symbols don't exist on OSX from what I can tell. Unfortunately I don't have access to a machine running OSX at the moment so getting a fix working may be kind of painful. Take a look at the osx_compat
branch I just pushed, this should hopefully add code for OSX to use. If this successfully compiles, can you do ./waf install --targets=OSTest
, then run the program ${PREFIX}/tests/sys/OSTest
? That should call the function that was causing problems, can you make sure it's printing reasonable values for system memory?
Thanks
Edit: You'll need to re-add your changes to projects/csm/wscript. If you can send me a diff I can get those in as well.
from six-library.
Came across this for SC_PHYS_PAGES when trying to solve the issue before posting here.
http://stackoverflow.com/questions/30511579/linux-sc-phys-pages-not-working-on-mac-os-x
I couldn't find anything similar for SC_AVPHYS_PAGES .
Here is a diff of the wscript:
@@ -5,6 +5,7 @@ PLUGIN = 'CSM'
REMOVEPLUGINPREFIX = True
import sys, os, re
+from waflib import Errors
DIRS = 'external'
@@ -22,6 +23,7 @@ def configure(conf):
linuxRegex = r'.*-.*-linux-.*|i686-pc-.*|linux'
solarisRegex = r'sparc-sun.*|i.86-pc-solaris.*|sunos'
winRegex = r'win32'
+ osxRegex = r'darwin'
if re.match(linuxRegex, sys.platform):
platformName = 'linux'
elif re.match(solarisRegex, sys.platform):
@@ -37,6 +39,8 @@ def configure(conf):
# For example, if you're building with VS 2008 Express, use:
# --enable-32bit "--msvc_version=msvc 9.0Exp"
platformName = 'winVC' + str(conf.env['MSVC_VERSION']).replace('.', '')
+ elif re.match(osxRegex, sys.platform):
+ platformName='darwin'
else:
raise Errors.WafError('Unsupported platform %s' % sys.platform)
Will check out the new branch and report back.
Thanks
from six-library.
I had to make a minor change to get this to work
--- a/externals/coda-oss/modules/c++/sys/source/OSUnix.cpp
+++ b/externals/coda-oss/modules/c++/sys/source/OSUnix.cpp
@@ -291,7 +291,7 @@ void sys::OSUnix::getMemInfo(size_t &totalPhysMem, size_t &freePhysMem) const
#if defined(__APPLE__)
long long physMem = 0;
size_t size = sizeof(physMem);
- int status = sysctlbyname("hw.memsize", &physMem, &length, 0, 0);
+ int status = sysctlbyname("hw.memsize", &physMem, &size, 0, 0);
if(status)
{
throw sys::SystemException(Ctxt("Call to sysctl() has failed"));
The code compiled fine after that and reported reasonable values:
Platform: Darwin (x86_64): 12.6.0 [build: Darwin Kernel Version 12.6.0: Wed Mar 18 16:23:48 PDT 2015; root:xnu-2050.48.19~1/RELEASE_X86_64]
Num CPUs: 8
The delimiter on this platform: /
The process id: 55951
Total physical memory (MB): 16384
Total free memory (MB): 6181
Did not find file: /Users/dummy/packages/six-library/blah.txt
Found directory: /Users/dummy/packages/six-library
Created file: ./TMPOMXeqM with size: 35
Killed file: ./TMPOMXeqM
Created test directory: TEST_DIRECTORY
Time Now: 1444329235
Start: 1.44433e+12
Finish Loop 1
Finish Loop 2
Finish Loop 3
Stop: 0.448974609375
Time Now: 1444329235
Piyush
from six-library.
Thanks for your help! I'll put in pull requests for these changes.
Charles
from six-library.
Related Issues (20)
- Expose nitf::BandInfo to python
- CSM3.0.3 version is out of date HOT 2
- Build fails if tests are disabled
- Numpyutils-c++ unit test fails build on Centos 7
- Slow performance reading and writing AMP8I_PHS8I HOT 7
- Embedding xsd schemas HOT 1
- Compilation Error six-library 3.1.2
- CSM project not included in CMake build system
- Enums.cpp does not compile under C++11 HOT 2
- Incorrect partial derivatives from ProjectionModel::slantToImagePartials
- build with shared libs broken
- Unable to configure build on Windows
- The configuration failed (complete log in C:\source-engine-master\build\config.log)
- SIDD 2.0.0 reading fails if no LUT present HOT 1
- Broken Sample SICD Links
- Issue with trying to build six 3.2.4, "numpyutils/AutoPtr.h" not found HOT 1
- CPHD Reader for build HOT 1
- python cphd module has broken SWIG bindings
- Where can one acquire sample CPHD?
- Building, installing and linking with six-library
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from six-library.