Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Few tweaks for boost formula. #15506

Closed
wants to merge 1 commit into from

3 participants

@manphiz
Collaborator
  • Fix typo in comment for adding rpath
  • Enable detailed build log by adding "-d2" to bjam.
    • This will show the actual compile commands during building.
  • Tweak ICU handling
    • Change icu4c_prefix to opt_prefix to avoid breakage when keg_only icu updates.
  • Use 'env :std'
    • Otherwise #{ENV.cxx} and MPI detection will be broken.
@manphiz
Collaborator

I may have misunderstood how bjam works. By "using darwin ;" in user-config.jam it will always pick g++ no matter which "--use-compiler" option is given. I wonder how I can get which compiler is specified through "--use-compiler" in brew so I can manually put it in user-config.jam.

@manphiz
Collaborator

OK, still no comments so far. Maybe this pull request is kinda too aggressive, but it does solve some current issues, especially enabling verbose build log and icu paths. Also due to limited knowledge of homebrew I don't know the right way to get compiler information from brew command switch such as "--use-gcc" or "--use-llvm" as user-config.jam here doesn't pick it based on environmental settings. So please share your opinion.

@adamv
Owner

I can't really comment; any other maintainers want to take a crack?

@mikemcquaid
Owner

I'll have a look later.

@manphiz
Collaborator

OK, it seems that it is superenv that breaks both compiler and mpi detections. I'm still testing whether 'env :userpaths' fixes this, or it will be better to use 'env :std'

@manphiz
Collaborator

Userpaths doesn't help here. Will enable 'env :std' in next commit.

@manphiz manphiz Few tweaks for boost formula.
* Fix typo in comment for adding rpath
* Enable detailed build log by adding "-d2" to bjam.
  - This will show the actual compile commands during building.
* Tweak ICU handling
  - Change icu4c_prefix to opt_prefix to avoid breakage when keg_only icu updates.
* Use 'env :std'
  - Otherwise #{ENV.cxx} and MPI detection will be broken.
624239d
@manphiz
Collaborator

Too many commits made it messy so I squashed it. Please review.

@mikemcquaid
Owner

Looks good. Will pull later.

@manphiz
Collaborator

Friendly bump :)

@mikemcquaid mikemcquaid closed this pull request from a commit
@manphiz manphiz boost: a few tweaks.
* Fix typo in comment for adding rpath
* Enable detailed build log by adding "-d2" to bjam.
  - This will show the actual compile commands during building.
* Tweak ICU handling
  - Change icu4c_prefix to opt_prefix to avoid breakage when keg_only icu updates.

Closes #15506.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
88cbd6a
@mikemcquaid
Owner

Pushed without the env :std as I couldn't remember your explanation of what broke with that. If you can elaborate again (sorry) I can add it.

@manphiz
Collaborator

Actually env :std is required as otherwise #{ENV.cxx} will always be 'c++' which is clang++ even with '--use-llvm' or '--use-gcc'.

Also it will not detect any installed mpi implementation, especially because my #{HOMEBREW_PREFIX} /opt/homebrew instead of /usr/local :) As a matter of fact MPI detection in boost formula is gray-area as there's no explicit dependency yet, and I don't know whether there is a way to specify alternative dependencies like depends 'open-mpi'|'mpich'. Anyway, if either implementation is installed correctly, boost can detect it but this will be broken without env :std.

@mikemcquaid
Owner

c++ isn't Clang; it's the new stuff in superenv. Let's try and get the mpi stuff in another pull request. Thanks!

@manphiz
Collaborator

Ah didn't know that. So if IUIC it just displays 'c++' in all cases but does invoke the specified compiler? Sounds like a little bit misleading but let's discuss it offline. I'll test a little more about MPI stuff and propose another pull request. Thanks.

@mikemcquaid
Owner

Yes, that's the case. Thanks.

@btb btb referenced this pull request from a commit
Commit has since been removed from the repository and is no longer available.
@theirix theirix referenced this pull request from a commit
Commit has since been removed from the repository and is no longer available.
@sessyargc sessyargc referenced this pull request from a commit
Commit has since been removed from the repository and is no longer available.
@snakeyroc3 snakeyroc3 referenced this pull request from a commit in snakeyroc3/homebrew
@manphiz manphiz boost: a few tweaks.
* Fix typo in comment for adding rpath
* Enable detailed build log by adding "-d2" to bjam.
  - This will show the actual compile commands during building.
* Tweak ICU handling
  - Change icu4c_prefix to opt_prefix to avoid breakage when keg_only icu updates.

Closes #15506.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
8c22654
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Oct 21, 2012
  1. @manphiz

    Few tweaks for boost formula.

    manphiz authored
    * Fix typo in comment for adding rpath
    * Enable detailed build log by adding "-d2" to bjam.
      - This will show the actual compile commands during building.
    * Tweak ICU handling
      - Change icu4c_prefix to opt_prefix to avoid breakage when keg_only icu updates.
    * Use 'env :std'
      - Otherwise #{ENV.cxx} and MPI detection will be broken.
This page is out of date. Refresh to see the latest.
Showing with 8 additions and 3 deletions.
  1. +8 −3 Library/Formula/boost.rb
View
11 Library/Formula/boost.rb
@@ -43,6 +43,8 @@ class Boost < Formula
cause "Dropped arguments to functions when linking with boost"
end
+ env :std
+
def install
# Adjust the name the libs are installed under to include the path to the
# Homebrew lib directory so executables will work when installed to a
@@ -59,7 +61,7 @@ def install
# /usr/local/bin/mkvmerge:
# /usr/local/lib/libboost_regex-mt.dylib (compatibility version 0.0.0, current version 0.0.0)
# /usr/local/lib/libboost_filesystem-mt.dylib (compatibility version 0.0.0, current version 0.0.0)
- # /usr/local/libboost_system-mt.dylib (compatibility version 0.0.0, current version 0.0.0)
+ # /usr/local/lib/libboost_system-mt.dylib (compatibility version 0.0.0, current version 0.0.0)
inreplace 'tools/build/v2/tools/darwin.jam', '-install_name "', "-install_name \"#{HOMEBREW_PREFIX}/lib/"
# Force boost to compile using the appropriate GCC version
@@ -71,13 +73,16 @@ def install
# we specify libdir too because the script is apparently broken
bargs = ["--prefix=#{prefix}", "--libdir=#{lib}"]
- if build.include? "with-icu"
- icu4c_prefix = Formula.factory('icu4c').prefix
+ if build.include? 'with-icu'
+ icu4c_prefix = Formula.factory('icu4c').opt_prefix
bargs << "--with-icu=#{icu4c_prefix}"
+ else
+ bargs << '--without-icu'
end
args = ["--prefix=#{prefix}",
"--libdir=#{lib}",
+ "-d2",
"-j#{ENV.make_jobs}",
"--layout=tagged",
"--user-config=user-config.jam",
Something went wrong with that request. Please try again.