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

Support clang on OS X 10.9 #16

Closed
seibert opened this issue Nov 26, 2013 · 3 comments
Closed

Support clang on OS X 10.9 #16

seibert opened this issue Nov 26, 2013 · 3 comments

Comments

@seibert
Copy link

seibert commented Nov 26, 2013

On OS X 10.9, clang is the only compiler shipped with XCode. Clang doesn't yet support OpenMP, so it might make sense to disable OpenMP backend was disabled when clang was detected. I'm also seeing various warnings or errors about compiler options for some examples, like invalid argument '-bundle' not allowed with '-dynamiclib'.

If I manually switch to the CUDA backend, I see the error ld: unknown option: -Wl, followed by the stack trace:

eriv(Rosenbrock):
Traceback (most recent call last):
  File "rosenbrock.py", line 25, in <module>
    print "Deriv(Rosenbrock):", rosenbrock_derivative(x)
  File "/work/mobi/parakeet/parakeet/frontend/decorators.py", line 20, in __call__
    return run_python_fn(self.f, args, kwargs, backend = backend_name)
  File "/work/mobi/parakeet/parakeet/frontend/run_function.py", line 133, in run_python_fn
    return run_untyped_fn(untyped, args, kwargs, backend)
  File "/work/mobi/parakeet/parakeet/frontend/run_function.py", line 115, in run_untyped_fn
    return run_typed_fn(typed_fn, linear_args, backend)
  File "/work/mobi/parakeet/parakeet/frontend/run_function.py", line 83, in run_typed_fn
    return cuda_backend.run(fn, args)
  File "/work/mobi/parakeet/parakeet/cuda_backend/run_function.py", line 17, in run
    compiled_fn = CudaCompiler().compile_entry(fn)
  File "/work/mobi/parakeet/parakeet/c_backend/pymodule_compiler.py", line 771, in compile_entry
    linker_flag_prefix = self.linker_flag_prefix)
  File "/work/mobi/parakeet/parakeet/c_backend/compile_util.py", line 271, in compile_module_from_source
    if not compiler_is_gnu(compiler):
  File "/work/mobi/parakeet/parakeet/c_backend/compile_util.py", line 209, in compiler_is_gnu
    return (compiler.endswith("gcc") or
AttributeError: 'list' object has no attribute 'endswith'

I am going to try installing gcc 4.8 next to see if that solves these problems.

@iskandr
Copy link
Owner

iskandr commented Nov 26, 2013

Hi Stan,

I'm going to disable clang as a compiler option until I have some way to
integrate it into regular testing. For now it was just a longshot "if all
else fails..."

Also, thanks for reporting the bug in "compiler_is_gnu", it will be fixed
in the next release.

On Mon, Nov 25, 2013 at 9:24 PM, Stan Seibert notifications@github.comwrote:

On OS X 10.9, clang is the only compiler shipped with XCode. Clang doesn't
yet support OpenMP, so it might make sense to disable OpenMP backend was
disabled when clang was detected. I'm also seeing various warnings or
errors about compiler options for some examples, like invalid argument
'-bundle' not allowed with '-dynamiclib'.

If I manually switch to the CUDA backend, I see the error ld: unknown
option: -Wl, followed by the stack trace:

eriv(Rosenbrock):
Traceback (most recent call last):
File "rosenbrock.py", line 25, in
print "Deriv(Rosenbrock):", rosenbrock_derivative(x)
File "/work/mobi/parakeet/parakeet/frontend/decorators.py", line 20, in call
return run_python_fn(self.f, args, kwargs, backend = backend_name)
File "/work/mobi/parakeet/parakeet/frontend/run_function.py", line 133, in run_python_fn
return run_untyped_fn(untyped, args, kwargs, backend)
File "/work/mobi/parakeet/parakeet/frontend/run_function.py", line 115, in run_untyped_fn
return run_typed_fn(typed_fn, linear_args, backend)
File "/work/mobi/parakeet/parakeet/frontend/run_function.py", line 83, in run_typed_fn
return cuda_backend.run(fn, args)
File "/work/mobi/parakeet/parakeet/cuda_backend/run_function.py", line 17, in run
compiled_fn = CudaCompiler().compile_entry(fn)
File "/work/mobi/parakeet/parakeet/c_backend/pymodule_compiler.py", line 771, in compile_entry
linker_flag_prefix = self.linker_flag_prefix)
File "/work/mobi/parakeet/parakeet/c_backend/compile_util.py", line 271, in compile_module_from_source
if not compiler_is_gnu(compiler):
File "/work/mobi/parakeet/parakeet/c_backend/compile_util.py", line 209, in compiler_is_gnu
return (compiler.endswith("gcc") or
AttributeError: 'list' object has no attribute 'endswith'

I am going to try installing gcc 4.8 next to see if that solves these
problems.


Reply to this email directly or view it on GitHubhttps://github.com//issues/16
.

@GJPvWesten
Copy link

Hi I am actually not sure if this is related, but on my Mac (OSX 10.9) I get compilation errors (for instance during test/compiler/test_optimizations.py)

I have checked the closed issue: "NPY_ARRAY_OWNDATA error", but I don't seem to have a double numpy installation, I am however using clang as compiler... Is this a no go for now?

/var/folders/q9/kdsh8dtj49d85knf905g099c0000gq/T/parakeet_nested_add1_VAamGK.c:152:47: error: use of undeclared identifier 'NPY_ARRAY_OWNDATA'
          PyArray_CLEARFLAGS(fresh_array, NPY_ARRAY_OWNDATA); 
                                          ^
/var/folders/q9/kdsh8dtj49d85knf905g099c0000gq/T/parakeet_nested_add1_VAamGK.c:160:60: error: use of undeclared identifier 'NPY_ARRAY_F_CONTIGUOUS'
      PyArray_CLEARFLAGS((PyArrayObject*) fresh_array, NPY_ARRAY_F_CONTIGUOUS);  
                                                       ^
/var/folders/q9/kdsh8dtj49d85knf905g099c0000gq/T/parakeet_nested_add1_VAamGK.c:161:60: error: use of undeclared identifier 'NPY_ARRAY_C_CONTIGUOUS'
      PyArray_CLEARFLAGS((PyArrayObject*) fresh_array, NPY_ARRAY_C_CONTIGUOUS);

@iskandr
Copy link
Owner

iskandr commented Mar 24, 2014

Hey Gerdus,

Sorry I don't yet have a better way to check multi-platform compile bugs. Do you mind seeing if the latest release works for you?

Thanks,
Alex

@iskandr iskandr closed this as completed Mar 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants