Uploaded image for project: 'Ruby Driver'
  1. Ruby Driver
  2. RUBY-2407

implicit declaration of bson_buffer_get_max_size function is invalid in C99

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Gone away
    • 1.5.1
    • None
    • BSON
    • None

    Description

      After a recent OSX upgrade it seems that i can no longer build bson_ext locally

       

      I'm running OSX 10.15.6

       

      ```

      cbson.c:602:18: error: implicit declaration of function 'bson_buffer_get_max_size' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
      if (length > bson_buffer_get_max_size(buffer)) {
      ^
      cbson.c:602:18: note: did you mean 'bson_buffer_set_max_size'?
      ./bson_buffer.h:34:6: note: 'bson_buffer_set_max_size' declared here
      void bson_buffer_set_max_size(bson_buffer_t buffer, int max_size);
      ^
      6 warnings and 1 error generated.
      make: *** [cbson.o] Error 1

      make failed, exit code 2

      Gem files will remain installed in /Users/rsim/.asdf/installs/ruby/2.6.6/lib/ruby/gems/2.6.0/gems/bson_ext-1.5.1 for inspection.
      Results logged to /Users/rsim/.asdf/installs/ruby/2.6.6/lib/ruby/gems/2.6.0/extensions/x86_64-darwin-19/2.6.0/bson_ext-1.5.1/gem_make.out

      An error occurred while installing bson_ext (1.5.1), and Bundler cannot continue.
      Make sure that `gem install bson_ext -v '1.5.1'` succeeds before bundling.

      ```

       

      ```

      $ gcc --version
      Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/4.2.1
      Apple clang version 12.0.0 (clang-1200.0.32.2)
      Target: x86_64-apple-darwin19.6.0
      Thread model: posix
      InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

      ```

      Attachments

        Activity

          People

            Unassigned Unassigned
            rsim@zendesk.com Russell Sim
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: