Graphegon / pygraphblas

GraphBLAS for Python
https://graphegon.github.io/pygraphblas/pygraphblas/index.html
Apache License 2.0
343 stars 27 forks source link

Building on Mac OS #19

Closed szarnyasg closed 4 years ago

szarnyasg commented 4 years ago

Hi @michelp, I've tried to install pygraphblas with @attilanagy234 using on Mac OS. We've managed to compile/install GraphBLAS and LAGraph but couldn't get pygraphblas to compile:

build/temp.macosx-10.14-x86_64-3.7/_pygraphblas.c:6376:10: fatal error: 'malloc.h' file not found
#include <malloc.h>
         ^~~~~~~~~~
22 warnings and 1 error generated.
error: command 'clang' failed with exit status 1

Do you have any suggestions on how to fix this? Thanks!

Full log:

$ python3 setup.py install
running install
running bdist_egg
running egg_info
creating pygraphblas.egg-info
writing pygraphblas.egg-info/PKG-INFO
writing dependency_links to pygraphblas.egg-info/dependency_links.txt
writing requirements to pygraphblas.egg-info/requires.txt
writing top-level names to pygraphblas.egg-info/top_level.txt
writing manifest file 'pygraphblas.egg-info/SOURCES.txt'
reading manifest file 'pygraphblas.egg-info/SOURCES.txt'
writing manifest file 'pygraphblas.egg-info/SOURCES.txt'
installing library code to build/bdist.macosx-10.14-x86_64/egg
running install_lib
running build_py
creating build
creating build/lib.macosx-10.14-x86_64-3.7
creating build/lib.macosx-10.14-x86_64-3.7/pygraphblas
copying pygraphblas/descriptor.py -> build/lib.macosx-10.14-x86_64-3.7/pygraphblas
copying pygraphblas/build.py -> build/lib.macosx-10.14-x86_64-3.7/pygraphblas
copying pygraphblas/matrix.py -> build/lib.macosx-10.14-x86_64-3.7/pygraphblas
copying pygraphblas/unaryop.py -> build/lib.macosx-10.14-x86_64-3.7/pygraphblas
copying pygraphblas/vector.py -> build/lib.macosx-10.14-x86_64-3.7/pygraphblas
copying pygraphblas/scalar.py -> build/lib.macosx-10.14-x86_64-3.7/pygraphblas
copying pygraphblas/__init__.py -> build/lib.macosx-10.14-x86_64-3.7/pygraphblas
copying pygraphblas/types.py -> build/lib.macosx-10.14-x86_64-3.7/pygraphblas
copying pygraphblas/semiring.py -> build/lib.macosx-10.14-x86_64-3.7/pygraphblas
copying pygraphblas/rdflib.py -> build/lib.macosx-10.14-x86_64-3.7/pygraphblas
copying pygraphblas/binaryop.py -> build/lib.macosx-10.14-x86_64-3.7/pygraphblas
copying pygraphblas/base.py -> build/lib.macosx-10.14-x86_64-3.7/pygraphblas
running build_ext
generating cffi module 'build/temp.macosx-10.14-x86_64-3.7/_pygraphblas.c'
creating build/temp.macosx-10.14-x86_64-3.7
building '_pygraphblas' extension
creating build/temp.macosx-10.14-x86_64-3.7/build
creating build/temp.macosx-10.14-x86_64-3.7/build/temp.macosx-10.14-x86_64-3.7
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -I/usr/local/include -I/usr/local/opt/openssl@1.1/include -I/usr/local/opt/sqlite/include -I/usr/local/Cellar/python/3.7.4_1/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c build/temp.macosx-10.14-x86_64-3.7/_pygraphblas.c -o build/temp.macosx-10.14-x86_64-3.7/build/temp.macosx-10.14-x86_64-3.7/_pygraphblas.o
build/temp.macosx-10.14-x86_64-3.7/_pygraphblas.c:3535:32: warning: comparison of integers of different signs: 'int64_t' (aka 'long long') and 'uint64_t'
      (aka 'unsigned long long') [-Wsign-compare]
        for (int64_t k = 0 ; k < e ; k += CHUNK)
                             ~ ^ ~
build/temp.macosx-10.14-x86_64-3.7/_pygraphblas.c:3543:38: warning: comparison of integers of different signs: 'GrB_Index' (aka 'unsigned long long') and 'int64_t'
      (aka 'long long') [-Wsign-compare]
            for (GrB_Index p = 0 ; p < chunk ; p++)
                                   ~ ^ ~~~~~
build/temp.macosx-10.14-x86_64-3.7/_pygraphblas.c:3675:14: warning: unused variable 'info' [-Wunused-variable]
    GrB_Info info ;
             ^
build/temp.macosx-10.14-x86_64-3.7/_pygraphblas.c:3861:16: warning: unused variable 'ok' [-Wunused-variable]
    int width, ok ;
               ^
build/temp.macosx-10.14-x86_64-3.7/_pygraphblas.c:4234:32: warning: comparison of integers of different signs: 'int64_t' (aka 'long long') and 'GrB_Index'
      (aka 'unsigned long long') [-Wsign-compare]
        for (int64_t k = 0 ; k < n ; k++)
                             ~ ^ ~
build/temp.macosx-10.14-x86_64-3.7/_pygraphblas.c:4336:35: warning: comparison of integers of different signs: 'int64_t' (aka 'long long') and 'GrB_Index'
      (aka 'unsigned long long') [-Wsign-compare]
    if      (type == GrB_BOOL   ) WRITE_TUPLES (bool    , 1, 0, 0, 0)
                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
build/temp.macosx-10.14-x86_64-3.7/_pygraphblas.c:4294:32: note: expanded from macro 'WRITE_TUPLES'
        for (int64_t k = 0 ; k < nvals ; k++)                               \
                             ~ ^ ~~~~~
build/temp.macosx-10.14-x86_64-3.7/_pygraphblas.c:4337:35: warning: comparison of integers of different signs: 'int64_t' (aka 'long long') and 'GrB_Index'
      (aka 'unsigned long long') [-Wsign-compare]
    else if (type == GrB_INT8   ) WRITE_TUPLES (int8_t  , 0, 1, 0, 0)
                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
build/temp.macosx-10.14-x86_64-3.7/_pygraphblas.c:4294:32: note: expanded from macro 'WRITE_TUPLES'
        for (int64_t k = 0 ; k < nvals ; k++)                               \
                             ~ ^ ~~~~~
build/temp.macosx-10.14-x86_64-3.7/_pygraphblas.c:4338:35: warning: comparison of integers of different signs: 'int64_t' (aka 'long long') and 'GrB_Index'
      (aka 'unsigned long long') [-Wsign-compare]
    else if (type == GrB_INT16  ) WRITE_TUPLES (int16_t , 0, 1, 0, 0)
                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
build/temp.macosx-10.14-x86_64-3.7/_pygraphblas.c:4294:32: note: expanded from macro 'WRITE_TUPLES'
        for (int64_t k = 0 ; k < nvals ; k++)                               \
                             ~ ^ ~~~~~
build/temp.macosx-10.14-x86_64-3.7/_pygraphblas.c:4339:35: warning: comparison of integers of different signs: 'int64_t' (aka 'long long') and 'GrB_Index'
      (aka 'unsigned long long') [-Wsign-compare]
    else if (type == GrB_INT32  ) WRITE_TUPLES (int32_t , 0, 1, 0, 0)
                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
build/temp.macosx-10.14-x86_64-3.7/_pygraphblas.c:4294:32: note: expanded from macro 'WRITE_TUPLES'
        for (int64_t k = 0 ; k < nvals ; k++)                               \
                             ~ ^ ~~~~~
build/temp.macosx-10.14-x86_64-3.7/_pygraphblas.c:4340:35: warning: comparison of integers of different signs: 'int64_t' (aka 'long long') and 'GrB_Index'
      (aka 'unsigned long long') [-Wsign-compare]
    else if (type == GrB_INT64  ) WRITE_TUPLES (int64_t , 0, 1, 0, 0)
                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
build/temp.macosx-10.14-x86_64-3.7/_pygraphblas.c:4294:32: note: expanded from macro 'WRITE_TUPLES'
        for (int64_t k = 0 ; k < nvals ; k++)                               \
                             ~ ^ ~~~~~
build/temp.macosx-10.14-x86_64-3.7/_pygraphblas.c:4341:35: warning: comparison of integers of different signs: 'int64_t' (aka 'long long') and 'GrB_Index'
      (aka 'unsigned long long') [-Wsign-compare]
    else if (type == GrB_UINT8  ) WRITE_TUPLES (uint8_t , 1, 0, 0, 0)
                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
build/temp.macosx-10.14-x86_64-3.7/_pygraphblas.c:4294:32: note: expanded from macro 'WRITE_TUPLES'
        for (int64_t k = 0 ; k < nvals ; k++)                               \
                             ~ ^ ~~~~~
build/temp.macosx-10.14-x86_64-3.7/_pygraphblas.c:4342:35: warning: comparison of integers of different signs: 'int64_t' (aka 'long long') and 'GrB_Index'
      (aka 'unsigned long long') [-Wsign-compare]
    else if (type == GrB_UINT16 ) WRITE_TUPLES (uint16_t, 1, 0, 0, 0)
                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
build/temp.macosx-10.14-x86_64-3.7/_pygraphblas.c:4294:32: note: expanded from macro 'WRITE_TUPLES'
        for (int64_t k = 0 ; k < nvals ; k++)                               \
                             ~ ^ ~~~~~
build/temp.macosx-10.14-x86_64-3.7/_pygraphblas.c:4343:35: warning: comparison of integers of different signs: 'int64_t' (aka 'long long') and 'GrB_Index'
      (aka 'unsigned long long') [-Wsign-compare]
    else if (type == GrB_UINT32 ) WRITE_TUPLES (uint32_t, 1, 0, 0, 0)
                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
build/temp.macosx-10.14-x86_64-3.7/_pygraphblas.c:4294:32: note: expanded from macro 'WRITE_TUPLES'
        for (int64_t k = 0 ; k < nvals ; k++)                               \
                             ~ ^ ~~~~~
build/temp.macosx-10.14-x86_64-3.7/_pygraphblas.c:4344:35: warning: comparison of integers of different signs: 'int64_t' (aka 'long long') and 'GrB_Index'
      (aka 'unsigned long long') [-Wsign-compare]
    else if (type == GrB_UINT64 ) WRITE_TUPLES (uint64_t, 1, 0, 0, 0)
                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
build/temp.macosx-10.14-x86_64-3.7/_pygraphblas.c:4294:32: note: expanded from macro 'WRITE_TUPLES'
        for (int64_t k = 0 ; k < nvals ; k++)                               \
                             ~ ^ ~~~~~
build/temp.macosx-10.14-x86_64-3.7/_pygraphblas.c:4345:35: warning: comparison of integers of different signs: 'int64_t' (aka 'long long') and 'GrB_Index'
      (aka 'unsigned long long') [-Wsign-compare]
    else if (type == GrB_FP32   ) WRITE_TUPLES (float   , 0, 0, 1, 0)
                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
build/temp.macosx-10.14-x86_64-3.7/_pygraphblas.c:4294:32: note: expanded from macro 'WRITE_TUPLES'
        for (int64_t k = 0 ; k < nvals ; k++)                               \
                             ~ ^ ~~~~~
build/temp.macosx-10.14-x86_64-3.7/_pygraphblas.c:4346:35: warning: comparison of integers of different signs: 'int64_t' (aka 'long long') and 'GrB_Index'
      (aka 'unsigned long long') [-Wsign-compare]
    else if (type == GrB_FP64   ) WRITE_TUPLES (double  , 0, 0, 1, 0)
                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
build/temp.macosx-10.14-x86_64-3.7/_pygraphblas.c:4294:32: note: expanded from macro 'WRITE_TUPLES'
        for (int64_t k = 0 ; k < nvals ; k++)                               \
                             ~ ^ ~~~~~
build/temp.macosx-10.14-x86_64-3.7/_pygraphblas.c:4351:9: warning: comparison of integers of different signs: 'int64_t' (aka 'long long') and 'GrB_Index'
      (aka 'unsigned long long') [-Wsign-compare]
        WRITE_TUPLES (double complex, 0, 0, 0, 1)
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
build/temp.macosx-10.14-x86_64-3.7/_pygraphblas.c:4294:32: note: expanded from macro 'WRITE_TUPLES'
        for (int64_t k = 0 ; k < nvals ; k++)                               \
                             ~ ^ ~~~~~
build/temp.macosx-10.14-x86_64-3.7/_pygraphblas.c:5318:28: warning: comparison of integers of different signs: 'int64_t' (aka 'long long') and 'GrB_Index'
      (aka 'unsigned long long') [-Wsign-compare]
    for (int64_t k = 0 ; k < nvals ; k++)
                         ~ ^ ~~~~~
build/temp.macosx-10.14-x86_64-3.7/_pygraphblas.c:5924:16: warning: comparison of integers of different signs: 'unsigned long long' and 'int' [-Wsign-compare]
    nthreads = LAGRAPH_MIN (n / 4096, nthreads) ;
               ^            ~~~~~~~~  ~~~~~~~~
build/temp.macosx-10.14-x86_64-3.7/_pygraphblas.c:573:32: note: expanded from macro 'LAGRAPH_MIN'
#define LAGRAPH_MIN(x,y) (((x) < (y)) ? (x) : (y))
                            ~  ^  ~
build/temp.macosx-10.14-x86_64-3.7/_pygraphblas.c:5940:32: warning: comparison of integers of different signs: 'int64_t' (aka 'long long') and 'GrB_Index'
      (aka 'unsigned long long') [-Wsign-compare]
        for (int64_t k = 0 ; k < n ; k++)
                             ~ ^ ~
build/temp.macosx-10.14-x86_64-3.7/_pygraphblas.c:5958:32: warning: comparison of integers of different signs: 'int64_t' (aka 'long long') and 'GrB_Index'
      (aka 'unsigned long long') [-Wsign-compare]
        for (int64_t k = 0 ; k < n ; k++)
                             ~ ^ ~
build/temp.macosx-10.14-x86_64-3.7/_pygraphblas.c:6039:16: warning: unused variable 'monoid' [-Wunused-variable]
    GrB_Monoid monoid = NULL ;
               ^
build/temp.macosx-10.14-x86_64-3.7/_pygraphblas.c:6376:10: fatal error: 'malloc.h' file not found
#include <malloc.h>
         ^~~~~~~~~~
22 warnings and 1 error generated.
error: command 'clang' failed with exit status 1
michelp commented 4 years ago

Hmm, that's odd, I don't know much about newer versions of osx. Googling, it looks like osx took out malloc.h and unified it all under stdlib.h (which is the "more" standard location) but that conflicts with linux to just unconditionally include it, so this might be a cffi bug. I have had great luck with docker on mac which might be a better option for you? I'll reach out to the cffi team and see ifthey have any suggestions.

BTW LAGraph is no longer needed for pygraphblas, I've static inlined all the functions that I use.

-Michel

On Thu, Jan 30, 2020 at 4:05 AM Gabor Szarnyas notifications@github.com wrote:

Hi @michelp https://github.com/michelp, I've tried to install pygraphblas with @attilanagy234 https://github.com/attilanagy234 using on Mac OS. We've managed to compile/install GraphBLAS and LAGraph but couldn't get pygraphblas to compile:

build/temp.macosx-10.14-x86_64-3.7/_pygraphblas.c:6376:10: fatal error: 'malloc.h' file not found#include ^~~~~~22 warnings and 1 error generated.error: command 'clang' failed with exit status 1

Do you have any suggestions on how to fix this? Thanks!

Full log:

$python3 setup.py installrunning installrunning bdist_eggrunning egg_infocreating pygraphblas.egg-infowriting pygraphblas.egg-info/PKG-INFOwriting dependency_links to pygraphblas.egg-info/dependency_links.txtwriting requirements to pygraphblas.egg-info/requires.txtwriting top-level names to pygraphblas.egg-info/top_level.txtwriting manifest file 'pygraphblas.egg-info/SOURCES.txt'reading manifest file 'pygraphblas.egg-info/SOURCES.txt'writing manifest file 'pygraphblas.egg-info/SOURCES.txt'installing library code to build/bdist.macosx-10.14-x86_64/eggrunning install_librunning build_pycreating buildcreating build/lib.macosx-10.14-x86_64-3.7creating build/lib.macosx-10.14-x86_64-3.7/pygraphblascopying pygraphblas/descriptor.py -> build/lib.macosx-10.14-x86_64-3.7/pygraphblascopying pygraphblas/build.py -> build/lib.macosx-10.14-x86_64-3.7/pygraphblascopying pygraphblas/matrix.py -> build/lib.macosx-10.14-x86_64-3.7/pygraphblascopying pygraphblas/unaryop.py -> build/lib.macosx-10.14-x86_64-3.7/pygraphblascopying pygraphblas/vector.py -> build/lib.macosx-10.14-x86_64-3.7/pygraphblascopying pygraphblas/scalar.py -> build/lib.macosx-10.14-x86_64-3.7/pygraphblascopying pygraphblas/init.py -> build/lib.macosx-10.14-x86_64-3.7/pygraphblascopying pygraphblas/types.py -> build/lib.macosx-10.14-x86_64-3.7/pygraphblascopying pygraphblas/semiring.py -> build/lib.macosx-10.14-x86_64-3.7/pygraphblascopying pygraphblas/rdflib.py -> build/lib.macosx-10.14-x86_64-3.7/pygraphblascopying pygraphblas/binaryop.py -> build/lib.macosx-10.14-x86_64-3.7/pygraphblascopying pygraphblas/base.py -> build/lib.macosx-10.14-x86_64-3.7/pygraphblasrunning build_extgenerating cffi module 'build/temp.macosx-10.14-x86_64-3.7/_pygraphblas.c'creating build/temp.macosx-10.14-x86_64-3.7building '_pygraphblas' extensioncreating build/temp.macosx-10.14-x86_64-3.7/buildcreating build/temp.macosx-10.14-x86_64-3.7/build/temp.macosx-10.14-x86_64-3.7clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -I/usr/local/include -I/usr/local/opt/openssl@1.1/include -I/usr/local/opt/sqlite/include -I/usr/local/Cellar/python/3.7.4_1/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c build/temp.macosx-10.14-x86_64-3.7/_pygraphblas.c -o build/temp.macosx-10.14-x86_64-3.7/build/temp.macosx-10.14-x86_64-3.7/_pygraphblas.obuild/temp.macosx-10.14-x86_64-3.7/_pygraphblas.c:3535:32: warning: comparison of integers of different signs: 'int64_t' (aka 'long long') and 'uint64_t' (aka 'unsigned long long') [-Wsign-compare] for (int64_t k = 0 ; k < e ; k += CHUNK) ~ ^ ~build/temp.macosx-10.14-x86_64-3.7/_pygraphblas.c:3543:38: warning: comparison of integers of different signs: 'GrB_Index' (aka 'unsigned long long') and 'int64_t' (aka 'long long') [-Wsign-compare] for (GrB_Index p = 0 ; p < chunk ; p++) ~ ^ ~build/temp.macosx-10.14-x86_64-3.7/_pygraphblas.c:3675:14: warning: unused variable 'info' [-Wunused-variable] GrB_Info info ; ^build/temp.macosx-10.14-x86_64-3.7/_pygraphblas.c:3861:16: warning: unused variable 'ok' [-Wunused-variable] int width, ok ; ^build/temp.macosx-10.14-x86_64-3.7/_pygraphblas.c:4234:32: warning: comparison of integers of different signs: 'int64_t' (aka 'long long') and 'GrB_Index' (aka 'unsigned long long') [-Wsign-compare] for (int64_t k = 0 ; k < n ; k++) ~ ^ ~build/temp.macosx-10.14-x86_64-3.7/_pygraphblas.c:4336:35: warning: comparison of integers of different signs: 'int64_t' (aka 'long long') and 'GrB_Index' (aka 'unsigned long long') [-Wsign-compare] if (type == GrB_BOOL ) WRITE_TUPLES (bool , 1, 0, 0, 0) ^~~~~~~~~build/temp.macosx-10.14-x86_64-3.7/_pygraphblas.c:4294:32: note: expanded from macro 'WRITE_TUPLES' for (int64_t k = 0 ; k < nvals ; k++) \ ~ ^ ~build/temp.macosx-10.14-x86_64-3.7/_pygraphblas.c:4337:35: warning: comparison of integers of different signs: 'int64_t' (aka 'long long') and 'GrB_Index' (aka 'unsigned long long') [-Wsign-compare] else if (type == GrB_INT8 ) WRITE_TUPLES (int8_t , 0, 1, 0, 0) ^~~~~~~build/temp.macosx-10.14-x86_64-3.7/_pygraphblas.c:4294:32: note: expanded from macro 'WRITE_TUPLES' for (int64_t k = 0 ; k < nvals ; k++) \ ~ ^ ~build/temp.macosx-10.14-x86_64-3.7/_pygraphblas.c:4338:35: warning: comparison of integers of different signs: 'int64_t' (aka 'long long') and 'GrB_Index' (aka 'unsigned long long') [-Wsign-compare] else if (type == GrB_INT16 ) WRITE_TUPLES (int16_t , 0, 1, 0, 0) ^~~~~~~build/temp.macosx-10.14-x86_64-3.7/_pygraphblas.c:4294:32: note: expanded from macro 'WRITE_TUPLES' for (int64_t k = 0 ; k < nvals ; k++) \ ~ ^ ~build/temp.macosx-10.14-x86_64-3.7/_pygraphblas.c:4339:35: warning: comparison of integers of different signs: 'int64_t' (aka 'long long') and 'GrB_Index' (aka 'unsigned long long') [-Wsign-compare] else if (type == GrB_INT32 ) WRITE_TUPLES (int32_t , 0, 1, 0, 0) ^~~~~~~build/temp.macosx-10.14-x86_64-3.7/_pygraphblas.c:4294:32: note: expanded from macro 'WRITE_TUPLES' for (int64_t k = 0 ; k < nvals ; k++) \ ~ ^ ~build/temp.macosx-10.14-x86_64-3.7/_pygraphblas.c:4340:35: warning: comparison of integers of different signs: 'int64_t' (aka 'long long') and 'GrB_Index' (aka 'unsigned long long') [-Wsign-compare] else if (type == GrB_INT64 ) WRITE_TUPLES (int64_t , 0, 1, 0, 0) ^~~~~~~build/temp.macosx-10.14-x86_64-3.7/_pygraphblas.c:4294:32: note: expanded from macro 'WRITE_TUPLES' for (int64_t k = 0 ; k < nvals ; k++) \ ~ ^ ~build/temp.macosx-10.14-x86_64-3.7/_pygraphblas.c:4341:35: warning: comparison of integers of different signs: 'int64_t' (aka 'long long') and 'GrB_Index' (aka 'unsigned long long') [-Wsign-compare] else if (type == GrB_UINT8 ) WRITE_TUPLES (uint8_t , 1, 0, 0, 0) ^~~~~~~build/temp.macosx-10.14-x86_64-3.7/_pygraphblas.c:4294:32: note: expanded from macro 'WRITE_TUPLES' for (int64_t k = 0 ; k < nvals ; k++) \ ~ ^ ~build/temp.macosx-10.14-x86_64-3.7/_pygraphblas.c:4342:35: warning: comparison of integers of different signs: 'int64_t' (aka 'long long') and 'GrB_Index' (aka 'unsigned long long') [-Wsign-compare] else if (type == GrB_UINT16 ) WRITE_TUPLES (uint16_t, 1, 0, 0, 0) ^~~~~~~build/temp.macosx-10.14-x86_64-3.7/_pygraphblas.c:4294:32: note: expanded from macro 'WRITE_TUPLES' for (int64_t k = 0 ; k < nvals ; k++) \ ~ ^ ~build/temp.macosx-10.14-x86_64-3.7/_pygraphblas.c:4343:35: warning: comparison of integers of different signs: 'int64_t' (aka 'long long') and 'GrB_Index' (aka 'unsigned long long') [-Wsign-compare] else if (type == GrB_UINT32 ) WRITE_TUPLES (uint32_t, 1, 0, 0, 0) ^~~~~~~build/temp.macosx-10.14-x86_64-3.7/_pygraphblas.c:4294:32: note: expanded from macro 'WRITE_TUPLES' for (int64_t k = 0 ; k < nvals ; k++) \ ~ ^ ~build/temp.macosx-10.14-x86_64-3.7/_pygraphblas.c:4344:35: warning: comparison of integers of different signs: 'int64_t' (aka 'long long') and 'GrB_Index' (aka 'unsigned long long') [-Wsign-compare] else if (type == GrB_UINT64 ) WRITE_TUPLES (uint64_t, 1, 0, 0, 0) ^~~~~~~build/temp.macosx-10.14-x86_64-3.7/_pygraphblas.c:4294:32: note: expanded from macro 'WRITE_TUPLES' for (int64_t k = 0 ; k < nvals ; k++) \ ~ ^ ~build/temp.macosx-10.14-x86_64-3.7/_pygraphblas.c:4345:35: warning: comparison of integers of different signs: 'int64_t' (aka 'long long') and 'GrB_Index' (aka 'unsigned long long') [-Wsign-compare] else if (type == GrB_FP32 ) WRITE_TUPLES (float , 0, 0, 1, 0) ^~~~~~~build/temp.macosx-10.14-x86_64-3.7/_pygraphblas.c:4294:32: note: expanded from macro 'WRITE_TUPLES' for (int64_t k = 0 ; k < nvals ; k++) \ ~ ^ ~build/temp.macosx-10.14-x86_64-3.7/_pygraphblas.c:4346:35: warning: comparison of integers of different signs: 'int64_t' (aka 'long long') and 'GrB_Index' (aka 'unsigned long long') [-Wsign-compare] else if (type == GrB_FP64 ) WRITE_TUPLES (double , 0, 0, 1, 0) ^~~~~~~build/temp.macosx-10.14-x86_64-3.7/_pygraphblas.c:4294:32: note: expanded from macro 'WRITE_TUPLES' for (int64_t k = 0 ; k < nvals ; k++) \ ~ ^ ~build/temp.macosx-10.14-x86_64-3.7/_pygraphblas.c:4351:9: warning: comparison of integers of different signs: 'int64_t' (aka 'long long') and 'GrB_Index' (aka 'unsigned long long') [-Wsign-compare] WRITE_TUPLES (double complex, 0, 0, 0, 1) ^~~~~~~~~build/temp.macosx-10.14-x86_64-3.7/_pygraphblas.c:4294:32: note: expanded from macro 'WRITE_TUPLES' for (int64_t k = 0 ; k < nvals ; k++) \ ~ ^ ~build/temp.macosx-10.14-x86_64-3.7/_pygraphblas.c:5318:28: warning: comparison of integers of different signs: 'int64_t' (aka 'long long') and 'GrB_Index' (aka 'unsigned long long') [-Wsign-compare] for (int64_t k = 0 ; k < nvals ; k++) ~ ^ ~build/temp.macosx-10.14-x86_64-3.7/_pygraphblas.c:5924:16: warning: comparison of integers of different signs: 'unsigned long long' and 'int' [-Wsign-compare] nthreads = LAGRAPH_MIN (n / 4096, nthreads) ; ^ ~~ ~~build/temp.macosx-10.14-x86_64-3.7/_pygraphblas.c:573:32: note: expanded from macro 'LAGRAPH_MIN'#define LAGRAPH_MIN(x,y) (((x) < (y)) ? (x) : (y)) ~ ^ ~build/temp.macosx-10.14-x86_64-3.7/_pygraphblas.c:5940:32: warning: comparison of integers of different signs: 'int64_t' (aka 'long long') and 'GrB_Index' (aka 'unsigned long long') [-Wsign-compare] for (int64_t k = 0 ; k < n ; k++) ~ ^ ~build/temp.macosx-10.14-x86_64-3.7/_pygraphblas.c:5958:32: warning: comparison of integers of different signs: 'int64_t' (aka 'long long') and 'GrB_Index' (aka 'unsigned long long') [-Wsign-compare] for (int64_t k = 0 ; k < n ; k++) ~ ^ ~build/temp.macosx-10.14-x86_64-3.7/_pygraphblas.c:6039:16: warning: unused variable 'monoid' [-Wunused-variable] GrB_Monoid monoid = NULL ; ^build/temp.macosx-10.14-x86_64-3.7/_pygraphblas.c:6376:10: fatal error: 'malloc.h' file not found#include ^~~~22 warnings and 1 error generated.error: command 'clang' failed with exit status 1

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/michelp/pygraphblas/issues/19?email_source=notifications&email_token=AAA6BCKZKGYWHPKDV2WN7X3RAK67RA5CNFSM4KNUZUZ2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4IJ2APUA, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAA6BCNBBZNIRDKUPSWHRG3RAK67RANCNFSM4KNUZUZQ .

szarnyasg commented 4 years ago

@michelp did you get any feedback from the cffi team? Maybe we could also ask around on the graphblas mailing list, maybe someone there has experience with the C/py/Mac constellation.

arigo commented 4 years ago

Hey! So I've searched the cffi sources for the exact line "#include ", with no space between the "#" and the "include", and I can tell you that this line doesn't come from cffi at all. Moreover it's very late in the generated file, not near the beginning. I would rather guess that you did set_source() with a string that itself contains an explicit "#include ".

arigo commented 4 years ago

Here: https://github.com/michelp/pygraphblas/blob/a2c654c003c772dab86a3d7a4b80bd831ec221f4/pygraphblas/cdef/LAGraph/LAGraph_init.c#L43

michelp commented 4 years ago

I apologize, you are correct. It comes from some third-party code that I in lines recently. I'll close the issue

On Fri, Feb 28, 2020, 9:40 AM Armin Rigo notifications@github.com wrote:

Hey! So I've searched the cffi sources for the exact line "#include

", with no space between the "#" and the "include", and I can tell you that this line doesn't come from cffi at all. Moreover it's very late in the generated file, not near the beginning. I would rather guess that you did set_source() with a string that itself contains an explicit "#include ". — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub , or unsubscribe .
arigo commented 4 years ago

:-)

michelp commented 4 years ago

I'm going to close this an open a LAGraph issue.

michelp commented 4 years ago

Hmm wait, @szarnyasg I see you mentioned you got LAGraph to compile first, so that's odd that the LAGraph_init code worked for you presumably but not me...

szarnyasg commented 4 years ago

@attilanagy234 can you try building the latest LAGraph (with SuiteSparse:GrB 3.2.0) on Mac OS?

On Fri, Feb 28, 2020, 19:07 Michel Pelletier notifications@github.com wrote:

Hmm wait, @szarnyasg https://github.com/szarnyasg I see you mentioned you got LAGraph to compile first, so that's odd that the LAGraph_init code worked for you presumably but not me...

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/michelp/pygraphblas/issues/19?email_source=notifications&email_token=AAKWPMPVISQWKVE4AMQWAUTRFFHFZA5CNFSM4KNUZUZ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOENJTFDY#issuecomment-592654991, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAKWPMJ5DLXKB5DFJQ4ZNYLRFFHFZANCNFSM4KNUZUZQ .

michelp commented 4 years ago

This issue is a LAGraph but, it's calling malopt which is part of malloc.h, not stdlib.h, so it can't be used on osx, I think what's needed are some include guards to only do the malopt on Linux, so I'll file a lagraph bug and close this.