XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.9.3
    • Component/s: library
    • Labels:
      None

      Description

      While trying to build the examples supplied with libcouchbase I see the following failure.

      ../cmake/configure --enable-examples
      make "VERBOSE=1"
      

      Results in

      cd /Users/rohinton.kazak/repositories/scratch/libcouchbase/build/example && /usr/local/Cellar/cmake/3.11.3/bin/cmake -E cmake_link_script CMakeFiles/minimal.dir/link.txt --verbose=1 /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc  -fno-strict-aliasing -pthread -O2 -g -DNDEBUG -fno-strict-aliasing -pthread -Wl,-search_paths_first -Wl,-headerpad_max_install_names  CMakeFiles/minimal.dir/minimal/minimal.c.o CMakeFiles/minimal.dir/minimal/query.c.o  -o ../bin/examples/minimal -Wl,-rpath,/Users/rohinton.kazak/repositories/scratch/libcouchbase/build/lib ../lib/libcouchbase.2.dylib -lm -ldl -lresolv /usr/local/opt/openssl/lib/libssl.dylib /usr/local/opt/openssl/lib/libcrypto.dylib duplicate symbol _main in:     CMakeFiles/minimal.dir/minimal/minimal.c.o     CMakeFiles/minimal.dir/minimal/query.c.o ld: 1 duplicate symbol for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) make[2]: *** [bin/examples/minimal] Error 1 make[1]: *** [example/CMakeFiles/minimal.dir/all] Error 2 make: *** [all] Error 2
      

      I believe that these should be separate standalone examples, as they both contain a main function, and somehow they have been merged into one.

        Attachments

        For Gerrit Dashboard: CCBC-947
        # Subject Branch Project Status CR V

          Activity

          Hide
          rohinton.kazak Rohinton Kazak added a comment -

          I don't mind doing the fix for this if my reasoning is correct, just let me know.  It will be a good way for me to try the contribution process.

           

          Show
          rohinton.kazak Rohinton Kazak added a comment - I don't mind doing the fix for this if my reasoning is correct, just let me know.  It will be a good way for me to try the contribution process.  
          Hide
          rohinton.kazak Rohinton Kazak added a comment -

          This also applies to the following

          duplicate symbol _main in:
              CMakeFiles/observe.dir/observe/durability.c.o
              CMakeFiles/observe.dir/observe/observe.c.o
          ld: 1 duplicate symbol for architecture x86_64
          clang: error: linker command failed with exit code 1 (use -v to see invocation)
          make[2]: *** [bin/examples/observe] Error 1
          make[1]: *** [example/CMakeFiles/observe.dir/all] Error 2
          make: *** [all] Error 2
          

           

          Show
          rohinton.kazak Rohinton Kazak added a comment - This also applies to the following duplicate symbol _main in:     CMakeFiles/observe.dir/observe/durability.c.o     CMakeFiles/observe.dir/observe/observe.c.o ld: 1 duplicate symbol for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) make[ 2 ]: *** [bin/examples/observe] Error 1 make[ 1 ]: *** [example/CMakeFiles/observe.dir/all] Error 2 make: *** [all] Error 2  
          Hide
          avsej Sergey Avseyev added a comment -

          The examples are not supposed to built with cmake. You have to build them out of the tree with libcouchbase installed in the system.

          Show
          avsej Sergey Avseyev added a comment - The examples are not supposed to built with cmake. You have to build them out of the tree with libcouchbase installed in the system.
          Hide
          avsej Sergey Avseyev added a comment -

          Well on the other hand some of them already built with cmake. Anyway thanks for finding it. I will fix them

          Show
          avsej Sergey Avseyev added a comment - Well on the other hand some of them already built with cmake. Anyway thanks for finding it. I will fix them
          Hide
          build-team Couchbase Build Team added a comment -

          Build libcouchbase-2.8.5-207 contains libcouchbase commit 00fe14c with commit message:
          CCBC-947: fix build scripts for examples

          Show
          build-team Couchbase Build Team added a comment - Build libcouchbase-2.8.5-207 contains libcouchbase commit 00fe14c with commit message: CCBC-947 : fix build scripts for examples
          Hide
          rohinton.kazak Rohinton Kazak added a comment -

          Thanks.

          Show
          rohinton.kazak Rohinton Kazak added a comment - Thanks.
          Hide
          build-team Couchbase Build Team added a comment -

          Build couchbase-server-6.5.0-1027 contains libcouchbase commit 00fe14c with commit message:
          CCBC-947: fix build scripts for examples

          Show
          build-team Couchbase Build Team added a comment - Build couchbase-server-6.5.0-1027 contains libcouchbase commit 00fe14c with commit message: CCBC-947 : fix build scripts for examples

            People

            • Assignee:
              avsej Sergey Avseyev
              Reporter:
              rohinton.kazak Rohinton Kazak
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Gerrit Reviews

                There are no open Gerrit changes

                  PagerDuty

                  Error rendering 'com.pagerduty.jira-server-plugin:PagerDuty'. Please contact your Jira administrators.