SpatioTemporal / STARE

SpatioTemporal Adaptive Resolution Encoding, a unifying index for geo-located data.
Other
10 stars 7 forks source link

Linking failure on new compile (MacOS) #113

Closed mbauer288 closed 1 year ago

mbauer288 commented 1 year ago

Compile error at the linking stage on MacOS when trying to use the new update. Not sure what the issue is, but it might be something has change with the OS or anaconda that is the issue.

[100%] Linking CXX executable tests

duplicate symbol '_main' in:
    CMakeFiles/tests.dir/Test.cpp.o
    ../../src/libSTARE.a(erfa.c.o)

ld: 1 duplicate symbol for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

make[2]: *** [tests/CUTE/tests] Error 1
make[1]: *** [tests/CUTE/CMakeFiles/tests.dir/all] Error 2
make: *** [all] Error 2

Longer version:

OS : MacOS 12.6.2 Codename : Monterey Kernel : 21.6.0 Architecture : arm64

CPU : Apple M1 Max @ 3.20GHz x 10 cores GPU : Apple M1 Max 32 cores RAM : 32GB LPDDR5-6400 MHz HD : 1 TB

XCode : 14.2 (clang-1400.0.29.202) conda : 22.11.1 cmake : 3.25.1 swig : 4.1.1 hdf4 : 4.2.15 pyhdf : 0.10.5

$ export PATH="/Users/mbauer/.localconda/bin:$PATH"
$ export CMAKE_INSTALL_PREFIX="/Users/mbauer/.localconda"
$ mkdir build; cd build
$ cmake -DSTARE_INSTALL_LIBDIR=lib -DBUILD_SHARED_LIBS=NO -DCMAKE_INSTALL_PREFIX:PATH=/Users/mbauer/.localconda ..
    -- The C compiler identification is AppleClang 14.0.0.14000029
    -- The CXX compiler identification is AppleClang 14.0.0.14000029
    -- Detecting C compiler ABI info
    -- Detecting C compiler ABI info - done
    -- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc - skipped
    -- Detecting C compile features
    -- Detecting C compile features - done
    -- Detecting CXX compiler ABI info
    -- Detecting CXX compiler ABI info - done
    -- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ - skipped
    -- Detecting CXX compile features
    -- Detecting CXX compile features - done

    ------------ Running cmake for project STARE ------------

     CUTE_INCLUDE_DIR: /Users/mbauer/SpatioTemporal/STARE/external/CUTE/cute

     CUTE Testing Enabled

     Setting C_OPT_FLAGS, CXX_OPT_FLAGS to -O3 by default.

     Optimization settings.
     C_OPT_FLAGS:  -O3
     CXX_OPT_FLAGS -O3

    -- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY
    -- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY - Success
    -- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY
    -- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY - Success
    -- Performing Test COMPILER_HAS_DEPRECATED_ATTR
    -- Performing Test COMPILER_HAS_DEPRECATED_ATTR - Success
    -- Found Doxygen: /Users/mbauer/miniconda3/envs/stare/bin/doxygen (found version "1.9.5") found components: doxygen dot

     Adding tests...

    -- Configuring done
    -- Generating done
    -- Build files have been written to: /Users/mbauer/SpatioTemporal/STARE/build
$ make -j4
    [  8%] Building CXX object src/CMakeFiles/STARE.dir/General.cpp.o
    [  8%] Building CXX object src/CMakeFiles/STARE.dir/HtmRange.cpp.o
    [  8%] Building CXX object src/CMakeFiles/STARE.dir/EmbeddedLevelNameEncoding.cpp.o
    [  8%] Building CXX object src/CMakeFiles/STARE.dir/BitShiftNameEncoding.cpp.o
    [ 10%] Building CXX object src/CMakeFiles/STARE.dir/HtmRangeIterator.cpp.o
    /Users/mbauer/SpatioTemporal/STARE/src/HtmRange.cpp:1198:5: warning: 'sprintf' is deprecated: This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Wdeprecated-declarations]
                                    sprintf(tmp_buf, "%llu", what == LOWS ? lo : hi);
                                    ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk/usr/include/stdio.h:188:1: note: 'sprintf' has been explicitly marked deprecated here
    __deprecated_msg("This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead.")
    ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk/usr/include/sys/cdefs.h:215:48: note: expanded from macro '__deprecated_msg'
            #define __deprecated_msg(_msg) __attribute__((__deprecated__(_msg)))
                                                          ^
    /Users/mbauer/SpatioTemporal/STARE/src/HtmRange.cpp:1211:5: warning: 'sprintf' is deprecated: This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Wdeprecated-declarations]
                                    sprintf(tmp_buf, "%llu..%llu", lo, hi);
                                    ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk/usr/include/stdio.h:188:1: note: 'sprintf' has been explicitly marked deprecated here
    __deprecated_msg("This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead.")
    ^
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk/usr/include/sys/cdefs.h:215:48: note: expanded from macro '__deprecated_msg'
            #define __deprecated_msg(_msg) __attribute__((__deprecated__(_msg)))
                                                          ^
    [ 13%] Building CXX object src/CMakeFiles/STARE.dir/HtmRangeMultiLevel.cpp.o
    [ 15%] Building CXX object src/CMakeFiles/STARE.dir/HtmRangeMultiLevelIterator.cpp.o
    [ 17%] Building CXX object src/CMakeFiles/STARE.dir/Htmio.cpp.o
    2 warnings generated.
    [ 19%] Building CXX object src/CMakeFiles/STARE.dir/HstmRange.cpp.o
    /Users/mbauer/SpatioTemporal/STARE/src/HtmRangeMultiLevel.cpp:1377:17: warning: variable 'hi_value' set but not used [-Wunused-but-set-variable]
      Key hi; Value hi_value;
                    ^
    /Users/mbauer/SpatioTemporal/STARE/src/HtmRangeMultiLevel.cpp:1994:2: warning: 'sprintf' is deprecated: This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Wdeprecated-declarations]
            sprintf(tmp_buf, "x%llx x%llx",lo,hi);
            ^
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk/usr/include/stdio.h:188:1: note: 'sprintf' has been explicitly marked deprecated here
    __deprecated_msg("This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead.")
    ^
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk/usr/include/sys/cdefs.h:215:48: note: expanded from macro '__deprecated_msg'
            #define __deprecated_msg(_msg) __attribute__((__deprecated__(_msg)))
                                                          ^
    /Users/mbauer/SpatioTemporal/STARE/src/HtmRangeMultiLevel.cpp:1996:2: warning: 'sprintf' is deprecated: This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Wdeprecated-declarations]
            sprintf(tmp_buf, "x%llx",lo);
            ^
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk/usr/include/stdio.h:188:1: note: 'sprintf' has been explicitly marked deprecated here
    __deprecated_msg("This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead.")
    ^
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk/usr/include/sys/cdefs.h:215:48: note: expanded from macro '__deprecated_msg'
            #define __deprecated_msg(_msg) __attribute__((__deprecated__(_msg)))
                                                          ^
    /Users/mbauer/SpatioTemporal/STARE/src/HtmRangeMultiLevel.cpp:2036:2: warning: 'sprintf' is deprecated: This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Wdeprecated-declarations]
            sprintf(tmp_buf, "%llu", what == LOWS ? lo : hi);
            ^
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk/usr/include/stdio.h:188:1: note: 'sprintf' has been explicitly marked deprecated here
    __deprecated_msg("This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead.")
    ^
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk/usr/include/sys/cdefs.h:215:48: note: expanded from macro '__deprecated_msg'
            #define __deprecated_msg(_msg) __attribute__((__deprecated__(_msg)))
                                                          ^
    /Users/mbauer/SpatioTemporal/STARE/src/HtmRangeMultiLevel.cpp:2045:2: warning: 'sprintf' is deprecated: This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Wdeprecated-declarations]
            sprintf(tmp_buf, "%llu..%llu", lo, hi);
            ^
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk/usr/include/stdio.h:188:1: note: 'sprintf' has been explicitly marked deprecated here
    __deprecated_msg("This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead.")
    ^
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk/usr/include/sys/cdefs.h:215:48: note: expanded from macro '__deprecated_msg'
            #define __deprecated_msg(_msg) __attribute__((__deprecated__(_msg)))
                                                          ^
    /Users/mbauer/SpatioTemporal/STARE/src/HtmRangeMultiLevel.cpp:2070:17: warning: variable 'hi_value' set but not used [-Wunused-but-set-variable]
      Key hi; Value hi_value;
                    ^
    [ 21%] Building CXX object src/CMakeFiles/STARE.dir/NameEncoding.cpp.o
    [ 23%] Building CXX object src/CMakeFiles/STARE.dir/RangeConvex.cpp.o
    6 warnings generated.
    [ 26%] Building CXX object src/CMakeFiles/STARE.dir/SkipList.cpp.o
    [ 28%] Building CXX object src/CMakeFiles/STARE.dir/SkipListElement.cpp.o
    [ 30%] Building CXX object src/CMakeFiles/STARE.dir/SpatialConstraint.cpp.o
    [ 32%] Building CXX object src/CMakeFiles/STARE.dir/SpatialDomain.cpp.o
    [ 34%] Building CXX object src/CMakeFiles/STARE.dir/SpatialEdge.cpp.o
    [ 36%] Building CXX object src/CMakeFiles/STARE.dir/SpatialException.cpp.o
    [ 39%] Building CXX object src/CMakeFiles/STARE.dir/SpatialGeneral.cpp.o
    [ 41%] Building CXX object src/CMakeFiles/STARE.dir/SpatialIndex.cpp.o
    [ 43%] Building CXX object src/CMakeFiles/STARE.dir/SpatialInterface.cpp.o
    /Users/mbauer/SpatioTemporal/STARE/src/SpatialException.cpp:57:8: warning: 'sprintf' is deprecated: This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Wdeprecated-declarations]
           sprintf(str_,"%s : %s",defaultstr[CONTEXT],defaultstr[defIndex]);
           ^
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk/usr/include/stdio.h:188:1: note: 'sprintf' has been explicitly marked deprecated here
    __deprecated_msg("This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead.")
    ^
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk/usr/include/sys/cdefs.h:215:48: note: expanded from macro '__deprecated_msg'
            #define __deprecated_msg(_msg) __attribute__((__deprecated__(_msg)))
                                                          ^
    /Users/mbauer/SpatioTemporal/STARE/src/SpatialException.cpp:73:6: warning: 'sprintf' is deprecated: This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Wdeprecated-declarations]
         sprintf(str_,"%s : %s",tmpc,tmpb);
         ^
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk/usr/include/stdio.h:188:1: note: 'sprintf' has been explicitly marked deprecated here
    __deprecated_msg("This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead.")
    ^
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk/usr/include/sys/cdefs.h:215:48: note: expanded from macro '__deprecated_msg'
            #define __deprecated_msg(_msg) __attribute__((__deprecated__(_msg)))
                                                          ^
    2 warnings generated.
    [ 45%] Building CXX object src/CMakeFiles/STARE.dir/SpatiallyAdaptiveDataCover.cpp.o
    [ 47%] Building CXX object src/CMakeFiles/STARE.dir/SpatialVector.cpp.o
    [ 50%] Building CXX object src/CMakeFiles/STARE.dir/SpatialPolygon.cpp.o
    /Users/mbauer/SpatioTemporal/STARE/src/SpatialVector.cpp:145:11: warning: unused variable 'L' [-Wunused-variable]
                    float64 L =  sqrt( X*X + Y*Y + Z*Z );
                            ^
    /Users/mbauer/SpatioTemporal/STARE/src/SpatialVector.cpp:437:2: warning: 'sprintf' is deprecated: This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Wdeprecated-declarations]
            sprintf(buffer,"%4.2e\n%4.2e\n%4.2e\n",x_,y_,z_);
            ^
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk/usr/include/stdio.h:188:1: note: 'sprintf' has been explicitly marked deprecated here
    __deprecated_msg("This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead.")
    ^
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk/usr/include/sys/cdefs.h:215:48: note: expanded from macro '__deprecated_msg'
            #define __deprecated_msg(_msg) __attribute__((__deprecated__(_msg)))
                                                          ^
    2 warnings generated.
    [ 52%] Building CXX object src/CMakeFiles/STARE.dir/SpatialRotation.cpp.o
    [ 54%] Building CXX object src/CMakeFiles/STARE.dir/STARE.cpp.o
    [ 56%] Building CXX object src/CMakeFiles/STARE.dir/SpatialRange.cpp.o
    [ 58%] Building CXX object src/CMakeFiles/STARE.dir/TemporalIndex.cpp.o
    [ 60%] Building CXX object src/CMakeFiles/STARE.dir/TemporalWordFormat1.cpp.o
    /Users/mbauer/SpatioTemporal/STARE/src/TemporalIndex.cpp:167:6: warning: variable 'not_ok' set but not used [-Wunused-but-set-variable]
            int not_ok, /* iy, im, id,*/  year, month, day_of_month, hour, minute, second, millisecond, ihmsf[4];
                ^
    /Users/mbauer/SpatioTemporal/STARE/src/TemporalIndex.cpp:276:6: warning: variable 'not_ok' set but not used [-Wunused-but-set-variable]
            int not_ok, /* iy, im, id,*/  year, month, day_of_month, hour, minute, second, millisecond, ihmsf[4];
                ^
    /Users/mbauer/SpatioTemporal/STARE/src/TemporalIndex.cpp:359:6: warning: variable 'not_ok' set but not used [-Wunused-but-set-variable]
            int not_ok;
                ^
    /Users/mbauer/SpatioTemporal/STARE/src/TemporalIndex.cpp:375:7: warning: variable 'not_ok' set but not used [-Wunused-but-set-variable]
      int not_ok;
          ^
    /Users/mbauer/SpatioTemporal/STARE/src/TemporalIndex.cpp:409:6: warning: variable 'not_ok' set but not used [-Wunused-but-set-variable]
            int not_ok = eraDtf2d( "UTC", _year, _month, _day_of_month, _hour, _minute, _second+(_millisecond*0.001), &utc1, &utc2 );
                ^
    /Users/mbauer/SpatioTemporal/STARE/src/TemporalIndex.cpp:1089:53: warning: variable 'CE' set but not used [-Wunused-but-set-variable]
        int64_t /*sum = 0,*/ total_left = milliseconds, CE = -1, year;
                                                        ^
    [ 63%] Building CXX object src/CMakeFiles/STARE.dir/VarStr.cpp.o
    [ 65%] Building C object src/CMakeFiles/STARE.dir/__/external/erfa-single-file/erfa.c.o
    /Users/mbauer/SpatioTemporal/STARE/external/erfa-single-file/erfa.c:26488:92: warning: variable 'count_postreset' is uninitialized when used here [-Wuninitialized]
        printf("t_leap_seconds set failed - leap second table has %d entries instead of %d\n", count_postreset, 1);
                                                                                               ^~~~~~~~~~~~~~~
    /Users/mbauer/SpatioTemporal/STARE/external/erfa-single-file/erfa.c:26472:49: note: initialize the variable 'count_postreset' to silence this warning
      int count_init, count_postset, count_postreset;
                                                    ^
                                                     = 0
    In file included from /Users/mbauer/SpatioTemporal/STARE/src/VarStr.cpp:3:
    /Users/mbauer/SpatioTemporal/STARE/include/VarStr.hpp:190:4: warning: 'sprintf' is deprecated: This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Wdeprecated-declarations]
       sprintf(str,"%d",orig);
       ^
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk/usr/include/stdio.h:188:1: note: 'sprintf' has been explicitly marked deprecated here
    __deprecated_msg("This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead.")
    ^
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk/usr/include/sys/cdefs.h:215:48: note: expanded from macro '__deprecated_msg'
            #define __deprecated_msg(_msg) __attribute__((__deprecated__(_msg)))
                                                          ^
    In file included from /Users/mbauer/SpatioTemporal/STARE/src/VarStr.cpp:3:
    /Users/mbauer/SpatioTemporal/STARE/include/VarStr.hpp:199:4: warning: 'sprintf' is deprecated: This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Wdeprecated-declarations]
       sprintf(str,"%u",orig);
       ^
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk/usr/include/stdio.h:188:1: note: 'sprintf' has been explicitly marked deprecated here
    __deprecated_msg("This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead.")
    ^
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk/usr/include/sys/cdefs.h:215:48: note: expanded from macro '__deprecated_msg'
            #define __deprecated_msg(_msg) __attribute__((__deprecated__(_msg)))
                                                          ^
    In file included from /Users/mbauer/SpatioTemporal/STARE/src/VarStr.cpp:3:
    /Users/mbauer/SpatioTemporal/STARE/include/VarStr.hpp:211:4: warning: 'sprintf' is deprecated: This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Wdeprecated-declarations]
       sprintf(str,"%lld",orig);
       ^
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk/usr/include/stdio.h:188:1: note: 'sprintf' has been explicitly marked deprecated here
    __deprecated_msg("This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead.")
    ^
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk/usr/include/sys/cdefs.h:215:48: note: expanded from macro '__deprecated_msg'
            #define __deprecated_msg(_msg) __attribute__((__deprecated__(_msg)))
                                                          ^
    In file included from /Users/mbauer/SpatioTemporal/STARE/src/VarStr.cpp:3:
    /Users/mbauer/SpatioTemporal/STARE/include/VarStr.hpp:224:4: warning: 'sprintf' is deprecated: This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Wdeprecated-declarations]
       sprintf(str,"%llu",orig);
       ^
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk/usr/include/stdio.h:188:1: note: 'sprintf' has been explicitly marked deprecated here
    __deprecated_msg("This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead.")
    ^
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk/usr/include/sys/cdefs.h:215:48: note: expanded from macro '__deprecated_msg'
            #define __deprecated_msg(_msg) __attribute__((__deprecated__(_msg)))
                                                          ^
    In file included from /Users/mbauer/SpatioTemporal/STARE/src/VarStr.cpp:3:
    /Users/mbauer/SpatioTemporal/STARE/include/VarStr.hpp:234:4: warning: 'sprintf' is deprecated: This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Wdeprecated-declarations]
       sprintf(str,"%1.8g",orig);
       ^
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk/usr/include/stdio.h:188:1: note: 'sprintf' has been explicitly marked deprecated here
    __deprecated_msg("This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead.")
    ^
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk/usr/include/sys/cdefs.h:215:48: note: expanded from macro '__deprecated_msg'
            #define __deprecated_msg(_msg) __attribute__((__deprecated__(_msg)))
                                                          ^
    In file included from /Users/mbauer/SpatioTemporal/STARE/src/VarStr.cpp:3:
    /Users/mbauer/SpatioTemporal/STARE/include/VarStr.hpp:243:4: warning: 'sprintf' is deprecated: This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Wdeprecated-declarations]
       sprintf(str,"%1.15g",orig);
       ^
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk/usr/include/stdio.h:188:1: note: 'sprintf' has been explicitly marked deprecated here
    __deprecated_msg("This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead.")
    ^
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk/usr/include/sys/cdefs.h:215:48: note: expanded from macro '__deprecated_msg'
            #define __deprecated_msg(_msg) __attribute__((__deprecated__(_msg)))
                                                          ^
    6 warnings generated.
    1 warning generated.
    6 warnings generated.
    [ 67%] Linking CXX static library libSTARE.a
    [ 67%] Built target STARE
    [ 69%] Building CXX object tests/CUTE/CMakeFiles/tests.dir/SpatialFailure_test.cpp.o
    [ 76%] Building CXX object tests/CUTE/CMakeFiles/tests.dir/AdaptSpatialResolutionEstimates_test.cpp.o
    [ 76%] Building CXX object tests/CUTE/CMakeFiles/tests.dir/SpatialIndex_test.cpp.o
    [ 76%] Building CXX object tests/CUTE/CMakeFiles/tests.dir/EmbeddedLevelNameEncoding_test.cpp.o
    [ 78%] Building CXX object tests/CUTE/CMakeFiles/tests.dir/SpatialInterface_test.cpp.o
    [ 80%] Building CXX object tests/CUTE/CMakeFiles/tests.dir/SpatialPolygon_test.cpp.o
    [ 82%] Building CXX object tests/CUTE/CMakeFiles/tests.dir/SpatialRange_test.cpp.o
    [ 84%] Building CXX object tests/CUTE/CMakeFiles/tests.dir/SpatialRotation_test.cpp.o
    [ 86%] Building CXX object tests/CUTE/CMakeFiles/tests.dir/SpatialVector_test.cpp.o
    /Users/mbauer/SpatioTemporal/STARE/tests/CUTE/SpatialRange_test.cpp:185:36: warning: variable 'term' set but not used [-Wunused-but-set-variable]
          STARE_ArrayIndexSpatialValue term;
                                       ^
    /Users/mbauer/SpatioTemporal/STARE/tests/CUTE/SpatialRange_test.cpp:202:36: warning: variable 'term' set but not used [-Wunused-but-set-variable]
          STARE_ArrayIndexSpatialValue term;
                                       ^
    /Users/mbauer/SpatioTemporal/STARE/tests/CUTE/SpatialRange_test.cpp:364:36: warning: variable 'term' set but not used [-Wunused-but-set-variable]
          STARE_ArrayIndexSpatialValue term;
                                       ^
    /Users/mbauer/SpatioTemporal/STARE/tests/CUTE/SpatialRange_test.cpp:381:36: warning: variable 'term' set but not used [-Wunused-but-set-variable]
          STARE_ArrayIndexSpatialValue term;
                                       ^
    /Users/mbauer/SpatioTemporal/STARE/tests/CUTE/SpatialRange_test.cpp:639:36: warning: variable 'term' set but not used [-Wunused-but-set-variable]
          STARE_ArrayIndexSpatialValue term;
                                       ^
    [ 89%] Building CXX object tests/CUTE/CMakeFiles/tests.dir/SpatioTemporalUsage_test.cpp.o
    [ 91%] Building CXX object tests/CUTE/CMakeFiles/tests.dir/STARE_test.cpp.o
    [ 93%] Building CXX object tests/CUTE/CMakeFiles/tests.dir/STARE_Covers_test.cpp.o
    /Users/mbauer/SpatioTemporal/STARE/tests/CUTE/STARE_test.cpp:793:7: warning: variable 'not_ok' set but not used [-Wunused-but-set-variable]
                    int not_ok = eraCal2jd(year,month,dom,&djm0,&djm);
                        ^
    5 warnings generated.
    [ 95%] Building CXX object tests/CUTE/CMakeFiles/tests.dir/TemporalIndex_test.cpp.o
    [ 97%] Building CXX object tests/CUTE/CMakeFiles/tests.dir/Test.cpp.o
    /Users/mbauer/SpatioTemporal/STARE/tests/CUTE/TemporalIndex_test.cpp:1248:7: warning: variable 'not_ok' set but not used [-Wunused-but-set-variable]
                    int not_ok;
                        ^
    /Users/mbauer/SpatioTemporal/STARE/tests/CUTE/TemporalIndex_test.cpp:1282:7: warning: variable 'not_ok' set but not used [-Wunused-but-set-variable]
                    int not_ok;
                        ^
    /Users/mbauer/SpatioTemporal/STARE/tests/CUTE/TemporalIndex_test.cpp:2526:12: warning: unused variable 't2L' [-Wunused-variable]
              int64_t t2L = scidbLowerBoundMS(t2);
                      ^
    /Users/mbauer/SpatioTemporal/STARE/tests/CUTE/TemporalIndex_test.cpp:2527:12: warning: unused variable 't2U' [-Wunused-variable]
              int64_t t2U = scidbUpperBoundMS(t2);
                      ^
    /Users/mbauer/SpatioTemporal/STARE/tests/CUTE/TemporalIndex_test.cpp:2353:12: warning: unused variable 't2U' [-Wunused-variable]
              int64_t t2U = scidbUpperBoundMS(t2);
                      ^
    /Users/mbauer/SpatioTemporal/STARE/tests/CUTE/TemporalIndex_test.cpp:2352:12: warning: unused variable 't2L' [-Wunused-variable]
              int64_t t2L = scidbLowerBoundMS(t2);
                      ^
    /Users/mbauer/SpatioTemporal/STARE/tests/CUTE/TemporalIndex_test.cpp:2619:14: warning: variable 'tiv02' set but not used [-Wunused-but-set-variable]
                int64_t tiv02;
                        ^
    /Users/mbauer/SpatioTemporal/STARE/tests/CUTE/Test.cpp:1739:33: warning: variable 'ljx' set but not used [-Wunused-but-set-variable]
      string failureMessage; uint64 ljx = 0;
                                    ^

Then the failure

1 warning generated.
7 warnings generated.
1 warning generated.
[100%] Linking CXX executable tests

duplicate symbol '_main' in:
    CMakeFiles/tests.dir/Test.cpp.o
    ../../src/libSTARE.a(erfa.c.o)

ld: 1 duplicate symbol for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

make[2]: *** [tests/CUTE/tests] Error 1
make[1]: *** [tests/CUTE/CMakeFiles/tests.dir/all] Error 2
make: *** [all] Error 2
mbauer288 commented 1 year ago

Ah, turning on debugging in make suggests that the problem might be related to CUTE

    1 warning generated.
     File `tests/CUTE/CMakeFiles/tests.dir/build' does not exist.
       File `tests/CUTE/tests' does not exist.
    7 warnings generated.
     File `tests/CUTE/CMakeFiles/tests.dir/build' does not exist.
       File `tests/CUTE/tests' does not exist.
    1 warning generated.
     File `tests/CUTE/CMakeFiles/tests.dir/build' does not exist.
       File `tests/CUTE/tests' does not exist.
      Must remake target `tests/CUTE/tests'.
    [100%] Linking CXX executable tests
    duplicate symbol '_main' in:
        CMakeFiles/tests.dir/Test.cpp.o
        ../../src/libSTARE.a(erfa.c.o)
    ld: 1 duplicate symbol for architecture arm64
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    make[2]: *** [tests/CUTE/tests] Error 1
    make[1]: *** [tests/CUTE/CMakeFiles/tests.dir/all] Error 2
    make: *** [all] Error 2
mbauer288 commented 1 year ago

Yup, reverted to previous version and compiled just fine.

michaelleerilee commented 1 year ago

Please try master 1.2.8 and let me know if it works. Glad that it's working on an Apple M machine.

mbauer288 commented 1 year ago

It works correctly now.