Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 2.9.3
    • library
    • None
    • 1

    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

          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.

           

          rohinton.kazak Rohinton Kazak (Inactive) 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.  

          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
          

           

          rohinton.kazak Rohinton Kazak (Inactive) 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  

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

          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.

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

          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

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

          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

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

          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

            avsej Sergey Avseyev
            rohinton.kazak Rohinton Kazak (Inactive)
            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