bloomberg / bde

Basic Development Environment - a set of foundational C++ libraries used at Bloomberg.
Apache License 2.0
1.68k stars 318 forks source link

Fix build error caused by BSLS_NOTHROW_SPEC not being defined. #240

Closed kevinbackhouse closed 6 years ago

kevinbackhouse commented 6 years ago

I checked out BDE and tried to build it, but got lots of build errors like this:

In file included from groups/bdl/bdldfp/bdldfp_decimalimputil.cpp:2:0:
/opt/work/semmle_data/projects/bde/revision-2018-January-29--16-51-26/bde/groups/bdl/bdldfp/bdldfp_decimalimputil.h:984:23: error: expected ';' at end of member declaration
     ValueType32 min32() BSLS_NOTHROW_SPEC;
                       ^

The problem is that BSLS_NOTHROW_SPEC is not defined. Including bsls_exceptionutil.h fixes the problem.

hyrosen commented 6 years ago

It's most likely that you're not supplying your build command with the proper arguments.

The currently released header files in /bb/build/Linux-x86_64-64/release/robolibs/trunk/opt/bb/include correspond to BDE version 3.4.2.0. Checking out that version, I can build without error on Linux using the command (extracted and modified from a verbose waf build)

/bb/bde/bbshr/bde-internal-tools/bin/compiler-wrappers/DTS/g++5 \
-DBDE_BUILD_TARGET_EXC -DBDE_BUILD_TARGET_MT -DBDE_BUILD_TARGET_OPT \
-DBSL_OVERRIDES_STD -DNDEBUG \
-D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT -D__USE_XOPEN2K8 \
-I/bb/build/Linux-x86_64-64/release/robolibs/trunk/opt/bb/include \
-I/bb/build/Linux-x86_64-64/release/robolibs/trunk/opt/bb/include/stlport \
-c groups/bdl/bdldfp/bdldfp_decimalimputil.cpp
hyrosen commented 6 years ago

Similarly, on the BDE master branch, the following command builds successfully

/bb/bde/bbshr/bde-internal-tools/bin/compiler-wrappers/DTS/g++5 \
-DBDE_BUILD_TARGET_EXC -DBDE_BUILD_TARGET_MT -DBDE_BUILD_TARGET_OPT \
-DBSL_OVERRIDES_STD -DNDEBUG \
-D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT -D__USE_XOPEN2K8 \
-Igroups/bdl/bdldfp \
-Igroups/bdl/bdlscm \
-Igroups/bsl/bsls \
-Igroups/bsl/bslscm \
-Igroups/bsl/bslmf \
-Igroups/bsl/bslma \
-Igroups/bsl/bslalg \
-Igroups/bsl/bslh \
-Igroups/bsl/bslstl \
-Igroups/bsl/bslstp \
-Igroups/bsl/bsl+bslhdrs \
-Igroups/bsl/bsl+stdhdrs \
-Ithirdparty \
-Ithirdparty/inteldfp/LIBRARY/src \
-c groups/bdl/bdldfp/bdldfp_decimalimputil.cpp
kevinbackhouse commented 6 years ago

Hi @hyrosen. I think you must be assuming that I am a Bloomberg employee. I do not have /bb/bde/bbshr/bde-internal-tools/bin/ on my machine. I am following the instructions in README.md. I have cloned bde and bde-tools and am running waf configure followed by waf build.

osubboo commented 6 years ago

Which compiler do you use? And UFID...

kevinbackhouse commented 6 years ago

I am currently using gcc (Debian 4.9.2-10) 4.9.2. I was originally trying to build on Ubuntu 17.10 with a much newer gcc, but when it failed I switched to attempting to build with Debian Jessie (in docker) because that's one of the supported platforms.

RMGiroux commented 6 years ago

@kevinbackhouse, well spotted. I think we've already dealt with this issue internally in our internal repo's pull request 1603, but we haven't published a new version of this open-source repo since then.

I'm cc'ing @osubboo - he can give you an estimate on when the next update will take place.

osubboo commented 6 years ago

I'll sync the repo within a week.

kevinbackhouse commented 6 years ago

@osubboo: Thanks! I will close this PR then.

osubboo commented 6 years ago

The repo updated with the latest master...