[SERVER-17747] FreeBSD 11.0-CURRENT build issue Created: 26/Mar/15  Updated: 12/Jan/16  Resolved: 03/Jun/15

Status: Closed
Project: Core Server
Component/s: Build
Affects Version/s: 3.1.0
Fix Version/s: 3.0.9, 3.1.4

Type: Bug Priority: Major - P3
Reporter: Andrew Shevchuk Assignee: Jonathan Reams
Resolution: Done Votes: 1
Labels: build-jbr
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:
  1. uname -a
    ===
    FreeBSD freebsd11 11.0-CURRENT FreeBSD 11.0-CURRENT #1 r280640: Thu Mar 26 09:13:09 UTC 2015 slayer@freebsd11:/usr/obj/usr/src/sys/slayer amd64
    ===
  1. pkg info
    ===
    binutils-2.25
    boost-all-1.55.0
    boost-docs-1.55.0
    boost-jam-1.55.0
    boost-libs-1.55.0_4
    clang36-3.6.0
    gawk-4.1.1_1
    gcc-4.8.4
    gcc-ecj-4.5
    gettext-runtime-0.19.4
    gmp-5.1.3_2
    icu-53.1
    indexinfo-0.2.2
    libevent2-2.0.22_1
    libexecinfo-1.1_3
    libffi-3.2.1
    libidn-1.29
    libsigsegv-2.10_1
    llvm36-3.6.0
    m4-1.4.17_1,1
    mc-light-4.1.40.p9_9
    mpc-1.0.2_1
    mpfr-3.1.2_2
    perl5-5.18.4_11
    pkg-1.4.12
    py27-setuptools27-5.5.1_1
    python2-2_3
    python27-2.7.9
    readline-6.3.8
    scons-2.3.0_1
    tmux-1.9a_1
    wget-1.16.2_1
    ===
  1. env
    ===

===


Attachments: File build.log    
Issue Links:
Duplicate
is duplicated by SERVER-17888 FreeBSD mongod/mongos terminate when ... Closed
Backwards Compatibility: Fully Compatible
Operating System: FreeBSD
Backport Completed:
Steps To Reproduce:

wget --no-check-certificate https://fastdl.mongodb.org/src/mongodb-src-r3.1.0.tar.gz
tar -zxvf ./mongodb-src-r3.1.0.tar.gz
cd ./mongodb-src-r3.1.0
scons all

Sprint: BUILD 4 06/05/15
Participants:

 Description   

While building MongoDB on FreeBSD 11.0, the build process was stopped in this compile step:
===
...
c++ -o build/freebsd/x86_64/normal/third_party/v8/src/platform-freebsd.o -c -Wnon-virtual-dtor -Woverloaded-virtual -std=c++11 -fno-omit-frame-pointer -fPIC -fno-strict-aliasing -ggdb -pthread -Wsign-compare -Wno-unknown-pragmas -Winvalid-pch -O3 -Wno-unused-local-typedefs -Wno-unused-function -Wno-unused-private-field -Wno-deprecated-declarations -Wno-tautological-constant-out-of-range-compare -Wno-unused-const-variable -Wno-missing-braces -Wno-null-conversion -ansi -Wno-unused-parameter -DBOOST_ALL_NO_LIB -DMONGO_EXPOSE_MACROS -DPCRE_STATIC -DSUPPORT_UTF8 -DMONGO_OPTIMIZED_BUILD -DMONGO_BYTE_ORDER=1234 -D_FILE_OFFSET_BITS=64 -DMONGO_HAVE___THREAD -DMONGO_HAVE_STD_IS_TRIVIALLY_COPYABLE -DMONGO_HAVE_HEADER_UNISTD_H -DMONGO_HAVE_POSIX_MONOTONIC_CLOCK -DMONGO_HAVE_EXECINFO_BACKTRACE -DV8_TARGET_ARCH_X64 -DENABLE_DEBUGGER_SUPPORT -Isrc/third_party/v8/src src/third_party/v8/src/platform-freebsd.cc
src/third_party/v8/src/platform-freebsd.cc:346:53: error: use of undeclared identifier 'MAP_NORESERVE'
MAP_PRIVATE | MAP_ANON | MAP_NORESERVE,
^
src/third_party/v8/src/platform-freebsd.cc:418:48: error: use of undeclared identifier 'MAP_NORESERVE'
MAP_PRIVATE | MAP_ANON | MAP_NORESERVE,
^
src/third_party/v8/src/platform-freebsd.cc:448:40: error: use of undeclared identifier 'MAP_NORESERVE'
MAP_PRIVATE | MAP_ANON | MAP_NORESERVE | MAP_FIXED,
^
3 errors generated.
scons: *** [build/freebsd/x86_64/normal/third_party/v8/src/platform-freebsd.o] Error 1
scons: building terminated because of errors.
===



 Comments   
Comment by Githook User [ 11/Jan/16 ]

Author:

{u'username': u'jbreams', u'name': u'Jonathan Reams', u'email': u'jbreams@mongodb.com'}

Message: SERVER-17747 Fix compile on FreeBSD 11

(cherry picked from commit 014d0c666ec15e819ad2bedf32a850ae29ede26e)
Branch: v3.0
https://github.com/mongodb/mongo/commit/018828df1ec4bd9df5ede5dfbb27e441dbf5cf9e

Comment by Alvaro Mantilla Gimenez [ 30/Aug/15 ]

Hi, also compilation errors in 10.2-RELEASE-p2:

c++ -o build/x86_64/normal/mongo/db/pipeline/document.o -c -Wnon-virtual-dtor -Woverloaded-virtual -std=c++11 -fno-omit-frame-pointer -fPIC -fno-strict-aliasing -ggdb -pthread -Wall -Wsign-compare -Wno-unknown-pragmas -Winvalid-pch -O2 -Wno-unused-function -Wno-unused-private-field -Wno-deprecated-declarations -Wno-tautological-constant-out-of-range-compare -Wno-unused-const-variable -Wno-missing-braces -Wno-null-conversion -fno-builtin-memcmp -DPCRE_STATIC -Isrc/third_party/s2 -Isrc/third_party/pcre-8.36 -Isrc/third_party/boost-1.56.0 -Ibuild/x86_64/normal -Isrc src/mongo/db/pipeline/document.cpp
In file included from src/mongo/db/pipeline/document.cpp:31:
In file included from src/mongo/db/pipeline/document.h:31:
In file included from src/mongo/db/pipeline/document_internal.h:36:
src/mongo/util/intrusive_counter.h:126:44: error: use of undeclared identifier 'free'
void operator delete (void* ptr)

{ free(ptr); }

^
1 error generated.
scons: *** [build/x86_64/normal/mongo/db/pipeline/document.o] Error 1
scons: building terminated because of errors.

Comment by Andrew Shevchuk [ 04/Jun/15 ]

Confirm successful builds and tests on FreeBSD 10.1 and FreeBSD 11.0.
Thanks.

Comment by Jonathan Reams [ 03/Jun/15 ]

MongoDB now compiles on my FreeBSD 11 VM and passes all the unit tests/jsCore.

Comment by Githook User [ 03/Jun/15 ]

Author:

{u'username': u'jbreams', u'name': u'Jonathan Reams', u'email': u'jbreams@mongodb.com'}

Message: SERVER-17747 Fix compile on FreeBSD 11
Branch: master
https://github.com/mongodb/mongo/commit/014d0c666ec15e819ad2bedf32a850ae29ede26e

Comment by Andrew Shevchuk [ 08/Apr/15 ]

Yet another compilation error on the same system:
===
c++ -o build/freebsd/x86_64/normal/mongo/db/storage/mmap_v1/btree/btree_logic.o -c -Wnon-virtual-dtor -Woverload[2/755$
ual -std=c++11 -fno-omit-frame-pointer -fPIC -fno-strict-aliasing -ggdb -pthread -Wall -Wsign-compare -Wno-unknown-prag
mas -Winvalid-pch -O3 -Wno-unused-local-typedefs -Wno-unused-function -Wno-unused-private-field -Wno-deprecated-declarations -Wno-tautological-constant-out-of-range-compare -Wno-unused-const-variable -Wno-missing-braces -Wno-null-convers$on -DBOOST_ALL_NO_LIB -DMONGO_EXPOSE_MACROS -DPCRE_STATIC -DSUPPORT_UTF8 -DMONGO_OPTIMIZED_BUILD -DMONGO_BYTE_ORDER=12$4 -D_FILE_OFFSET_BITS=64 -DMONGO_HAVE___THREAD -DMONGO_HAVE_STD_IS_TRIVIALLY_COPYABLE -DMONGO_HAVE_HEADER_UNISTD_H -DM$NGO_HAVE_POSIX_MONOTONIC_CLOCK -DMONGO_HAVE_EXECINFO_BACKTRACE -Isrc/third_party/s2 -Isrc/third_party/pcre-8.36 -Isrc/$hird_party/boost-1.56.0 -Ibuild/freebsd/x86_64/normal -Isrc src/mongo/db/storage/mmap_v1/btree/btree_logic.cpp
In file included from src/mongo/db/storage/mmap_v1/btree/btree_logic.cpp:35:
In file included from src/mongo/db/storage/mmap_v1/btree/btree_logic.h:37:
src/mongo/db/storage/mmap_v1/btree/btree_ondisk.h:183:40: error: reinterpret_cast from 'nullptr_t' to
'mongo::BtreeBucketV0 *' is not allowed
sizeof(BtreeBucketV0) - sizeof(reinterpret_cast<BtreeBucketV0*>(NULL)->data)

src/third_party/boost-1.56.0/boost/static_assert.hpp:78:55: note: expanded from macro 'BOOST_STATIC_ASSERT'
define BOOST_STATIC_ASSERT( ... ) static_assert(_VA_ARGS, #VA_ARGS_)
^
In file included from src/mongo/db/storage/mmap_v1/btree/btree_logic.cpp:35:
In file included from src/mongo/db/storage/mmap_v1/btree/btree_logic.h:37:
src/mongo/db/storage/mmap_v1/btree/btree_ondisk.h:317:40: error: reinterpret_cast from 'nullptr_t' to
'mongo::BtreeBucketV1 *' is not allowed
sizeof(BtreeBucketV1) - sizeof(reinterpret_cast<BtreeBucketV1*>(NULL)->data)

src/third_party/boost-1.56.0/boost/static_assert.hpp:78:55: note: expanded from macro 'BOOST_STATIC_ASSERT'
define BOOST_STATIC_ASSERT( ... ) static_assert(_VA_ARGS, #VA_ARGS_)
^
2 errors generated.
scons: *** [build/freebsd/x86_64/normal/mongo/db/storage/mmap_v1/btree/btree_logic.o] Error 1
scons: building terminated because of errors.
===

Comment by Andrew Shevchuk [ 07/Apr/15 ]

Another compilation error on the same system:
===
c++ -o build/freebsd/x86_64/normal/mongo/db/exec/pipeline_proxy.o -c -Wnon-virtual-dtor -Woverloaded-virtual -std=c++11 -fno-omit-frame-pointer -fPIC -fno-strict-aliasing -ggdb -pthread -Wall -Wsign-compare -Wno-unknown-pragmas -Winvalid-pch -O3 -Wno-unused-local-typedefs -Wno-unused-function -Wno-unused-private-field -Wno-deprecated-declarations -Wno-tautological-constant-out-of-range-compare -Wno-unused-const-variable -Wno-missing-braces -Wno-null-conversion -DBOOST_ALL_NO_LIB -DMONGO_EXPOSE_MACROS -DPCRE_STATIC -DSUPPORT_UTF8 -DMONGO_OPTIMIZED_BUILD -DMONGO_BYTE_ORDER=1234 -D_FILE_OFFSET_BITS=64 -DMONGO_HAVE___THREAD -DMONGO_HAVE_STD_IS_TRIVIALLY_COPYABLE -DMONGO_HAVE_HEADER_UNISTD_H -DMONGO_HAVE_POSIX_MONOTONIC_CLOCK -DMONGO_HAVE_EXECINFO_BACKTRACE -Isrc/third_party/s2 -Isrc/third_party/pcre-8.36 -Isrc/third_party/boost-1.56.0 -Ibuild/freebsd/x86_64/normal -Isrc src/mongo/db/exec/pipeline_proxy.cpp
c++ -o build/freebsd/x86_64/normal/mongo/db/pipeline/document.o -c -Wnon-virtual-dtor -Woverloaded-virtual -std=c++11 -fno-omit-frame-pointer -fPIC -fno-strict-aliasing -ggdb -pthread -Wall -Wsign-compare -Wno-unknown-pragmas -Winvalid-pch -O3 -Wno-unused-local-typedefs -Wno-unused-function -Wno-unused-private-field -Wno-deprecated-declarations -Wno-tautological-constant-out-of-range-compare -Wno-unused-const-variable -Wno-missing-braces -Wno-null-conversion -DBOOST_ALL_NO_LIB -DMONGO_EXPOSE_MACROS -DPCRE_STATIC -DSUPPORT_UTF8 -DMONGO_OPTIMIZED_BUILD -DMONGO_BYTE_ORDER=1234 -D_FILE_OFFSET_BITS=64 -DMONGO_HAVE___THREAD -DMONGO_HAVE_STD_IS_TRIVIALLY_COPYABLE -DMONGO_HAVE_HEADER_UNISTD_H -DMONGO_HAVE_POSIX_MONOTONIC_CLOCK -DMONGO_HAVE_EXECINFO_BACKTRACE -Isrc/third_party/s2 -Isrc/third_party/pcre-8.36 -Isrc/third_party/boost-1.56.0 -Ibuild/freebsd/x86_64/normal -Isrc src/mongo/db/pipeline/document.cpp
In file included from src/mongo/db/pipeline/document.cpp:31:
In file included from src/mongo/db/pipeline/document.h:31:
In file included from src/mongo/db/pipeline/document_internal.h:36:
src/mongo/util/intrusive_counter.h:126:44: error: use of undeclared identifier 'free'
void operator delete (void* ptr)

{ free(ptr); }

^
1 error generated.
scons: *** [build/freebsd/x86_64/normal/mongo/db/pipeline/document.o] Error 1
scons: building terminated because of errors.
===

Comment by Andrew Morrow (Inactive) [ 26/Mar/15 ]

Hi -

It looks like FreeBSD removed a flag that V8 uses:

https://codereview.chromium.org/1025823003/

Generated at Thu Feb 08 03:45:27 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.