Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running make clean deletes *_cpp03 files from MWC #251

Open
1 task done
pniedzielski opened this issue Apr 16, 2024 · 3 comments
Open
1 task done

Running make clean deletes *_cpp03 files from MWC #251

pniedzielski opened this issue Apr 16, 2024 · 3 comments
Labels
A-Build Area: Build System bug Something isn't working help wanted Extra attention is needed

Comments

@pniedzielski
Copy link
Collaborator

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

Running make clean from a build directory removes the following checked-in files from the source , resulting in unstaged changes in the git repo:

Unstaged changes (12)
deleted    src/groups/mwc/mwcex/mwcex_bindutil_cpp03.cpp
deleted    src/groups/mwc/mwcex/mwcex_bindutil_cpp03.h
deleted    src/groups/mwc/mwcex/mwcex_future_cpp03.cpp
deleted    src/groups/mwc/mwcex/mwcex_future_cpp03.h
deleted    src/groups/mwc/mwcex/mwcex_promise_cpp03.cpp
deleted    src/groups/mwc/mwcex/mwcex_promise_cpp03.h
deleted    src/groups/mwc/mwcu/mwcu_noop_cpp03.cpp
deleted    src/groups/mwc/mwcu/mwcu_noop_cpp03.h
deleted    src/groups/mwc/mwcu/mwcu_objectplaceholder_cpp03.cpp
deleted    src/groups/mwc/mwcu/mwcu_objectplaceholder_cpp03.h
deleted    src/groups/mwc/mwcu/mwcu_operationchain_cpp03.cpp
deleted    src/groups/mwc/mwcu/mwcu_operationchain_cpp03.h

Expected Behavior

Running make clean from a build directory should not modify the source directory.

Steps To Reproduce

  1. Clone the repo at main.
  2. ./bin/build-darwin.sh from an up-to-date Mac.
  3. (cd build/blazingmq && make clean) && ./bin/build-darwin.sh

BlazingMQ Version

HEAD

Anything else?

I will see if I can reproduce this on a Linux box this evening.

Deleting the blazingmq build directory obviates this problem (cd build && rm -r blazingmq in place of the steps to reproduce). The _cpp03.h files are generated as part of our build to provide C++03 compatible copies of C++11 or later constructs in MWC. Despite being generated, they should probably live in source control. My intuition is that CMake will be our savior here.

@pniedzielski pniedzielski added bug Something isn't working help wanted Extra attention is needed A-Build Area: Build System labels Apr 16, 2024
@melvinhe
Copy link
Contributor

@pniedzielski Tried reproducing this on an M3 Max Mac this evening. When running ./bin/build-darwin.sh, I get the following error:

...
CMake Error at thirdparty/bde-tools/BdeBuildSystem/BdeImportPkgConfigTargets.cmake:230 (message):
  Cannot find benchmark.pc file in these paths:
  /Users/melvinhe/Desktop/Bloomberg/blazingmq/lib/pkgconfig
  /opt/homebrew/lib/pkgconfig /opt/homebrew/opt/zlib/lib/pkgconfig
  /opt/homebrew/opt/googletest/lib/pkgconfig
  /Users/melvinhe/Desktop/Bloomberg/blazingmq/lib/pkgconfig
  /opt/homebrew/lib/pkgconfig /opt/homebrew/opt/zlib/lib/pkgconfig
  /opt/homebrew/opt/googletest/lib/pkgconfig

  [CALL_CHAIN=benchmark]
Call Stack (most recent call first):
  thirdparty/bde-tools/BdeBuildSystem/BdeImportPkgConfigTargets.cmake:184 (_bbs_pcimport_get_pcfile)
  thirdparty/bde-tools/BdeBuildSystem/BdeImportPkgConfigTargets.cmake:127 (_bbs_pcimport_import_pkgconfig_target)
  thirdparty/bde-tools/BdeBuildSystem/BdeImportPkgConfigTargets.cmake:108 (_bbs_pcimport_add_package)
  thirdparty/bde-tools/BdeBuildSystem/BdeImportPkgConfigTargets.cmake:86 (_bbs_import_pkgconfig_targets)
  thirdparty/bde-tools/BdeBuildSystem/BdeTargetUtils.cmake:85 (bbs_import_pkgconfig_targets)
  thirdparty/bde-tools/BdeBuildSystem/BdeTargetUtils.cmake:130:EVAL:2 (_bbs_defer_target_import)
  CMakeLists.txt:DEFERRED

-- Configuring incomplete, errors occurred!

Anything I may be missing when trying to replicate this?

@pniedzielski
Copy link
Collaborator Author

@melvinhe Thanks for checking this out for us. Could you let me know what the output of

  1. pkg-config --libs benchmark,
  2. uname -p, and
  3. pkg-config --variable pc_path pkg-config

for me? The output you showed indicates that libbenchmark isn't installed/accessible on your system, and so it could be an issue with brew, libbenchmark, or pkg-config.

@melvinhe
Copy link
Contributor

melvinhe commented Apr 23, 2024

@pniedzielski Thanks, I get the following:

melvinhe@macbook-pro-375 blazingmq % pkg-config --libs benchmark
-L/usr/local/Cellar/google-benchmark/1.8.3/lib -lbenchmark
melvinhe@macbook-pro-375 blazingmq % uname -p
arm
melvinhe@macbook-pro-375 blazingmq % pkg-config --variable pc_path pkg-config
/usr/local/lib/pkgconfig:/usr/local/share/pkgconfig:/usr/lib/pkgconfig:/usr/local/Homebrew/Library/Homebrew/os/mac/pkgconfig/12

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Build Area: Build System bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants