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

Works great on OSX, some tweaks needed to configure.ac possibly #2

Open
dch opened this issue Jan 22, 2013 · 8 comments
Open

Works great on OSX, some tweaks needed to configure.ac possibly #2

dch opened this issue Jan 22, 2013 · 8 comments

Comments

@dch
Copy link
Contributor

dch commented Jan 22, 2013

Thanks, this works great on OSX ML.

Despite having /usr/bin/libtoolthere's no libtoolize. so I needed to fudge that by doing:

brew install libtool
rehash
ln -s `which glibtool` ~/bin/libtool
ln -s `which glibtoolize` ~/bin/libtoolize

There is surely a better way to handle this by allowing configure.ac to use the glibtool* variant in preference.

After that, the instructions work just fine:

brew install protobuf-c
./build.sh
./configure --with-protobuf-c-dir=/usr/local/Cellar/protobuf-c/0.15 
make

Finally, would you consider adding a new example that allows sending arbitrary metrics to riemann from the command line, using getopts or similar parsing?

e.g. `riemannc --host IP --port PORT --tags="a,b,c" --state "critical" ... etc?

I will have a go at this anyway but my C is very rusty so it will take a while.

@dhilst
Copy link
Owner

dhilst commented Jan 23, 2013

Hey @dch, thanks for your reply, I will take a look at libtool dependency problem on OSX. A simple modification on build.sh would do it.

About the riemannc. I'm planing to write some binary with support to querying and receiving events on command line.

Best regards!

@dhilst
Copy link
Owner

dhilst commented Jan 26, 2013

Hiho @dch, check this out 27dd744

@dhilst
Copy link
Owner

dhilst commented Jan 26, 2013

Hiho @dch, can you remove the libtoolize link that you created, apply this https://github.com/gkos/riemann-c-client/pull/4.patch and see if it now works.

@dch
Copy link
Contributor Author

dch commented Jan 26, 2013

I pulled the new branch, it works fine for OSX, many thanks Daniel! Note
the PACKAGE_VERSION warning below, not sure if that's relevant but it is
also in the master branch too.

$ ./build.sh
/usr/local/bin/glibtoolize
glibtoolize: putting auxiliary files in .'. glibtoolize: copying file./config.guess'
glibtoolize: copying file ./config.sub' glibtoolize: copying file./install-sh'
glibtoolize: copying file ./ltmain.sh' glibtoolize: putting macros in AC_CONFIG_MACRO_DIR,m4'.
glibtoolize: copying file m4/libtool.m4' glibtoolize: copying filem4/ltoptions.m4'
glibtoolize: copying file m4/ltsugar.m4' glibtoolize: copying filem4/ltversion.m4'
glibtoolize: copying file `m4/lt~obsolete.m4'
configure.ac:9: installing './missing'
src/Makefile.am:9: warning: subst .,:,$(PACKAGE_VERSION: non-POSIX variable
name
src/Makefile.am:9: (probably a GNU make extension)
src/Makefile.am: installing './depcomp'

On 26 January 2013 14:19, Daniel Hilst notifications@github.com wrote:

Hiho @dch https://github.com/dch, can you remove the libtoolize link
that you created, apply this #4https://github.com/gkos/riemann-c-client/issues/4and see if it now works.


Reply to this email directly or view it on GitHubhttps://github.com//issues/2#issuecomment-12735216.

@dhilst
Copy link
Owner

dhilst commented Jan 27, 2013

Hi @dch, thanks for your reply. I'm merging the fix to master..
I can't figure out the problem with your pull request, but I can't merge it.
Can you close that and do a new PR, you can generate the patches, and apply on a new branch..
and do the new PR.

I'm planing a Wiki for build process on diferent systems, what you think?

Cheers!

@dch
Copy link
Contributor Author

dch commented Jan 27, 2013

& done!

Best to have build notes in the README directly. Less places to look ===
less errors === less open issues.

your call!

On 27 January 2013 22:41, Daniel Hilst notifications@github.com wrote:

Hi @dch https://github.com/dch, thanks for your reply. I'm merging the
fix to master..
I can't figure out the problem with your pull request, but I can't merge
it.
Can you close that and do a new PR, you can generate the patches, and
apply on a new branch..
and do the new PR.

I'm planing a Wiki for build process on diferent systems, what you think?

Cheers!

?
Reply to this email directly or view it on GitHubhttps://github.com//issues/2#issuecomment-12762201.

@dhilst
Copy link
Owner

dhilst commented Feb 24, 2013

@dch can you cofirm if this https://github.com/gkos/riemann-c-client/wiki/Osx works?
Cheers!

@dch
Copy link
Contributor Author

dch commented Feb 25, 2013

Yup it does.

the code doesn't convert to a homebrew recipe though - I'll not be able to
fix this but here's a start:

require 'formula'

class Riemannc < Formula
  homepage 'http://gkos.github.com/riemann-c-client/'
  url 'https://github.com/gkos/riemann-c-client/archive/4.4.0.tar.gz'
  sha1 '17fa39bbca0db1b1f404d0f8737a7c6c855c7bac'
  head 'https://github.com/gkos/riemann-c-client.git'

  depends_on 'autoconf' => :build
  depends_on 'automake' => :build
  depends_on 'protobuf-c'
  depends_on 'libtool' => :build

  def install
    ENV["LIBTOOLIZE"] = "glibtoolize"
    system "./build.sh"
    system "./configure",
         "--prefix=#{prefix}",
         "--with-protobuf-c-dir=#{Formula.factory('protobuf-c')}"
    system "make"
    system "make install"
  end
end

I'm not interested in the tag (tar.gz) release atm as soon as you release
the next version we can switch it to use that.

So you can install like this brew install -v -HEAD riemannc which
currently will fail as the build dir is an export, not an actual git repo:

dch@akai repos % brew install riemannc --HEAD -v


==> Cloning https://github.com/gkos/riemann-c-client.git
git --git-dir /Library/Caches/Homebrew/riemannc--git/.git status -s
Updating /Library/Caches/Homebrew/riemannc--git
git config remote.origin.url https://github.com/gkos/riemann-c-client.git
git config remote.origin.fetch +refs/heads/master:refs/remotes/origin/master
git fetch origin
git checkout -f master
Already on 'master'
git reset --hard origin/HEAD
HEAD is now at a0a02c5 README.md update
git reset --hard origin/HEAD
HEAD is now at a0a02c5 README.md update
git checkout-index -a -f --prefix=/tmp/riemannc-MPNN/
==> ./build.sh
./build.sh
fatal: Not a git repository (or any of the parent directories): .git
configure.ac:9: error: AC_INIT should be called with package and version
arguments
/usr/local/Cellar/automake/1.13.1/share/aclocal-1.13/init.m4:120:
AM_INIT_AUTOMAKE is expanded from...
configure.ac:9: the top level
autom4te: /usr/bin/m4 failed with exit status: 1
aclocal: error: echo failed with exit status: 1
==> Configuration
HOMEBREW_VERSION: 0.9.4
HEAD: 7bbc0f8cfb0d3bb978b4a635daecb7a9477c1d10
CPU: 8-core 64-bit sandybridge
OS X: 10.8.2-x86_64
Xcode: 4.6
CLT: 4.6.0.0.1.1358221012
X11: 2.7.4 => /opt/X11
==> ENV
CC: cc
CXX: c++
MAKEFLAGS: -j8
CMAKE_PREFIX_PATH: /usr/local
CMAKE_INCLUDE_PATH:
/usr/include/libxml2:/System/Library/Frameworks/OpenGL.framework/Versions/Current/Headers/
CMAKE_LIBRARY_PATH:
/System/Library/Frameworks/OpenGL.framework/Versions/Current/Libraries
PKG_CONFIG_PATH:
/usr/local/lib/pkgconfig:/usr/local/share/pkgconfig:/usr/local/Library/ENV/pkgconfig/mountain_lion
HOMEBREW_BUILD_FROM_SOURCE: 1
ACLOCAL_PATH: /usr/local/share/aclocal
OBJC: cc
PATH:
/usr/local/Library/ENV/4.3:/usr/local/opt/autoconf/bin:/usr/local/opt/automake/bin:/usr/local/opt/protobuf/bin:/usr/local/opt/protobuf-c/bin:/usr/local/opt/libtool/bin:/usr/bin:/bin:/usr/sbin:/sbin

Error: riemannc did not build

On 24 February 2013 05:28, Daniel Hilst notifications@github.com wrote:

@dch https://github.com/dch can you cofirm if this
https://github.com/gkos/riemann-c-client/wiki/Osx works?
Cheers!


Reply to this email directly or view it on GitHubhttps://github.com//issues/2#issuecomment-14003295.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants