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

qpid-proton 0.17.0 (new formula) #10111

Closed
wants to merge 5 commits into from
Closed

Conversation

crenz
Copy link

@crenz crenz commented Feb 19, 2017

New formula for Apache Qpid Proton AMQP library.
Provides C and Go language bindings.

  • Have you followed the guidelines for contributing?
  • Have you checked that there aren't other open pull requests for the same formula update/change?
  • Have you built your formula locally with brew install --build-from-source <formula>, where <formula> is the name of the formula you're submitting?
  • Does your build pass brew audit --strict <formula> (after doing brew install <formula>)?

New formula for Apache Qpid Proton AMQP library.
Provides C and Go language bindings.
-DBUILD_RUBY=OFF
]

# qpid-proton require build in a subdirectory
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can remove this comment.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment removed as requested.


# qpid-proton require build in a subdirectory
Dir.mkdir("build")
Dir.chdir("build")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can instead do mkdir "build" do of the above two.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed as requested.

def install
# Javascript bindings switched off - leads to build errors
# Perl, Python, Ruby bindings switched off - leads to linking errors
cmake_args = %w[
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Name this args for consistency with other formulae.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Renamed to args as requested.


test do
(testpath/"test.c").write <<-EOS.undent
#include "proton/message.h"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indent this two characters right of the ( on the preceding line.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indented as requested.

messenger = pn_messenger(NULL);
return 0;
}
EOS
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ident this with system below.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indented as requested.

return 0;
}
EOS
system ENV.cc, "test.c", "-I#{include}", "-L#{lib}64", "-lqpid-proton", "-o", "test"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should install libraries to lib not lib64.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed as requested.

@MikeMcQuaid
Copy link
Member

Test failing on 10.10: https://bot.brew.sh/job/Homebrew%20Core/16695/version=el_capitan/testReport/junit/brew-test-bot/el_capitan/test_qpid_proton/

Will need some _clock_gettime surgery CC @ilovezfs for suggestions.

@ilovezfs ilovezfs added the clock_gettime CI fails due to clock_gettime symbol label Feb 25, 2017
@ilovezfs
Copy link
Contributor

Will need some _clock_gettime surgery CC @ilovezfs for suggestions.

    if MacOS.version == "10.11" && MacOS::Xcode.installed? && MacOS::Xcode.version >= "8.0"
      inreplace "proton-c/CMakeLists.txt",
        "CHECK_SYMBOL_EXISTS(clock_gettime \"time.h\" CLOCK_GETTIME_IN_LIBC)",
        "CHECK_SYMBOL_EXISTS(undefined_gibberish \"time.h\" CLOCK_GETTIME_IN_LIBC)"
    end

- Indentation
- Installation to lib/ instead of lib64/ (fixing perl/python/ruby
bindings issues in the process)
- mkdir do
- Attempted fix for El Capitan issue
As suggested by ilovezfs
@crenz
Copy link
Author

crenz commented Feb 27, 2017

Still doesn't work. Will need to take some time to review this in detail.

@JCount
Copy link
Contributor

JCount commented Feb 27, 2017

@crenz Your last commit seems to have built fine on the CI, including El Capitan. Is there some other issue besides the clock_gettime problem that you were trying to solve?

@crenz
Copy link
Author

crenz commented Feb 28, 2017

@JCount When I checked last night, the build failed - that was what I was referring to. Maybe I looked at the wrong build.

In any case, I did find one more issue: The build works with the system perl, but does not work with the Homebrew perl package. The reason is that the Homebrew build flags specify -arch-i386 -arch x86_64 (which is supported by system perl), but the Homebrew perl package is only a 64 bit package. The build works without the -arch-i386 flag, so I will look for a way to change the perl module build flags if the Homebrew perl package is installed.

The underlying issue is that Homebrew needs to be made aware I'm using the perl package. I addressed this with a 'depends' statement.

depends_on "cmake" => :build
depends_on "libuv"
depends_on "openssl"
depends_on "perl" if Formula["perl"].installed?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

depends_on :perl without the if

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MikeMcQuaid – I'd prefer to not depend on perl and python. The thing is, this library works very well with the system perl and python. But IF the homebrew packages are installed, I need to reference them for the compilation to work correctly. It would be a nuisance to force people to install the perl and python packages for no good reason. Some people prefer to work with the system packages (for example since they want to develop software that should run on plain-vanilla macOs), so we should give them a choice.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, we don't support that use-case. depends_on :perl does what you suggest if they are building from source and uses the Homebrew perl when using a binary package.

depends_on "libuv"
depends_on "openssl"
depends_on "perl" if Formula["perl"].installed?
depends_on "python" if Formula["python"].installed?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

depends_on :python without the if

The modules for the perl and python bindings can be found in
#{Formula["qpid-proton"].opt_prefix}/lib/proton/bindings
EOS
end
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can omit these caveats as this is the default location.

"CHECK_SYMBOL_EXISTS(undefined_gibberish \"time.h\" CLOCK_GETTIME_IN_LIBC)"
end

inreplace "proton-c/bindings/perl/CMakeLists.txt",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please submit this patch to the upstream developers of this project and add a link to the upstream patch submission and explanation of why the patch is needed in a comment in the formula file. Thanks!

]

if MacOS.version == "10.11" && MacOS::Xcode.installed? && MacOS::Xcode.version >= "8.0"
inreplace "proton-c/CMakeLists.txt",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please submit this patch to the upstream developers of this project and add a link to the upstream patch submission and explanation of why the patch is needed in a comment in the formula file. Thanks!

ENV["OPENSSL_ROOT_DIR"] = Formula["openssl"].opt_prefix

# Enforce installation into lib/ instead of lib64/
system "sed", "-i.orig", "1s/^/set(LIB_SUFFIX \"\") /", "CMakeLists.txt"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please submit this patch to the upstream developers of this project and add a link to the upstream patch submission and explanation of why the patch is needed in a comment in the formula file. Thanks!

Also, use inreplace here instead.

@@ -0,0 +1,64 @@
class QpidProton < Formula
desc "is a high-performance, lightweight AMQP 1.0 messaging library."
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove is a

@dunn dunn added the needs response Needs a response from the issue/PR author label Mar 8, 2017
@bfontaine bfontaine added the new formula PR adds a new formula to Homebrew/homebrew-core label Mar 10, 2017
@crenz
Copy link
Author

crenz commented Mar 27, 2017

Sorry, I was rather busy with another project. Will attempt to get to this soon.

@BrewTestBot BrewTestBot removed the needs response Needs a response from the issue/PR author label Mar 27, 2017
@dunn dunn added the needs response Needs a response from the issue/PR author label Apr 1, 2017
@JCount
Copy link
Contributor

JCount commented Apr 20, 2017

Closing this as stalled because there has been essentially no activity since Mar 2.

@JCount JCount closed this Apr 20, 2017
@kbrock
Copy link
Contributor

kbrock commented Jul 21, 2017

@crenz Thanks for the recipe. Playing with it and seeing what I can fix

@BrewTestBot BrewTestBot removed the needs response Needs a response from the issue/PR author label Jul 21, 2017
@gberginc
Copy link

@kbrock as we are discussing this right now with @Fryguy I just want to check if you managed to push this any further? I am also keen on updating it for Qpid Proton v0.18 which is about to happen.

@Fryguy Fryguy mentioned this pull request Oct 13, 2017
4 tasks
@kbrock
Copy link
Contributor

kbrock commented Oct 20, 2017

@gberginc see the referenced PR from Fryguy

@Homebrew Homebrew locked and limited conversation to collaborators May 4, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
clock_gettime CI fails due to clock_gettime symbol new formula PR adds a new formula to Homebrew/homebrew-core
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants