Attached an initial Homebrew formula for compiling sigrok under Mac OS X Lion.
It compiles fine, and I get sigrok-cli at /usr/local/bin. However, when trying
to run it, I get the following error message:
==============================================
$ sigrok-cli
dyld: Symbol not found: _environ
Referenced from: /usr/local/lib/libpython3.2m.dylib
Expected in: dynamic lookup
Trace/BPT trap: 5
==============================================
I'm too weak in the proper Pythonic ways to understand why that happens.
Googling the following web page is the only one I found that seems to be
relevant:
http://www.neuron.yale.edu/phpbb/viewtopic.php?f=4&t=2370
However, that deals with Python2.7, not Python3.
--Pekka Nikander
require 'formula'
# Documentation: https://github.com/mxcl/homebrew/wiki/Formula-Cookbook
# PLEASE REMOVE ALL GENERATED COMMENTS BEFORE SUBMITTING YOUR PULL REQUEST!
class Sigrok < Formula
homepage 'http://sigrok.org'
head 'git://sigrok.git.sourceforge.net/gitroot/sigrok/sigrok'
depends_on 'pkg-config' => :build
depends_on 'glib' => :install
depends_on 'libusb' => :build
depends_on 'libzip' => :build
depends_on 'libftdi' => :build
depends_on 'python3' => :build
def patches
# Fixes small omissions from the autogen.sh and configure.ac files.
# Note that it is essentially the same patch, several times
DATA
end
def install
ENV['PKG_CONFIG_PATH'] += ":#{lib}/pkgconfig"
for component in [ "libsigrok", "libsigrokdecode", "sigrok-cli" ] do
cd component do
system "./autogen.sh"
system "./configure", "--prefix=#{prefix}"
system "make install"
end
end
end
def test
# This test will fail and we won't accept that! It's enough to just replace
# "false" with the main program this formula installs, but it'd be nice if you
# were more thorough. Run the test with `brew test sigrok`.
system "false"
end
end
__END__
--- a/libsigrok/autogen.sh 2012-05-11 09:23:35.000000000 +0300
+++ b/libsigrok/autogen.sh 2012-05-11 09:14:17.000000000 +0300
@@ -32,6 +32,9 @@
elif [ -d /opt/local/share/aclocal ]; then
# Macports installs aclocal macros here
ACLOCAL_DIR="-I /opt/local/share/aclocal"
+ elif [ -d /usr/local/share/aclocal ]; then
+ # Homebrew installs aclocal macros here
+ ACLOCAL_DIR="-I /usr/local/share/aclocal"
elif [ -d /usr/share/aclocal ]; then
# Xcode installs aclocal macros here
ACLOCAL_DIR="-I /usr/share/aclocal"
--- a/libsigrok/configure.ac 2012-05-10 13:33:43.000000000 +0300
+++ b/libsigrok/configure.ac 2012-05-11 09:17:52.000000000 +0300
@@ -35,6 +35,7 @@
# We require at least automake 1.11 (needed for 'silent rules').
AM_INIT_AUTOMAKE([1.11 -Wall -Werror foreign std-options])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
+m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
AH_TOP([#ifndef SR_CONFIG_H
#define SR_CONFIG_H /* To stop multiple inclusions. */])
--- a/libsigrokdecode/autogen.sh 2012-05-11 09:23:35.000000000 +0300
+++ b/libsigrokdecode/autogen.sh 2012-05-11 09:14:17.000000000 +0300
@@ -32,6 +32,9 @@
elif [ -d /opt/local/share/aclocal ]; then
# Macports installs aclocal macros here
ACLOCAL_DIR="-I /opt/local/share/aclocal"
+ elif [ -d /usr/local/share/aclocal ]; then
+ # Homebrew installs aclocal macros here
+ ACLOCAL_DIR="-I /usr/local/share/aclocal"
elif [ -d /usr/share/aclocal ]; then
# Xcode installs aclocal macros here
ACLOCAL_DIR="-I /usr/share/aclocal"
--- a/libsigrokdecode/configure.ac 2012-05-10 13:33:43.000000000 +0300
+++ b/libsigrokdecode/configure.ac 2012-05-11 09:17:52.000000000 +0300
@@ -35,6 +35,7 @@
# We require at least automake 1.11 (needed for 'silent rules').
AM_INIT_AUTOMAKE([1.11 -Wall -Werror foreign std-options])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
+m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
AH_TOP([#ifndef SR_CONFIG_H
#define SR_CONFIG_H /* To stop multiple inclusions. */])
--- a/sigrok-cli/autogen.sh 2012-05-11 09:23:35.000000000 +0300
+++ b/sigrok-cli/autogen.sh 2012-05-11 09:14:17.000000000 +0300
@@ -32,6 +32,9 @@
elif [ -d /opt/local/share/aclocal ]; then
# Macports installs aclocal macros here
ACLOCAL_DIR="-I /opt/local/share/aclocal"
+ elif [ -d /usr/local/share/aclocal ]; then
+ # Homebrew installs aclocal macros here
+ ACLOCAL_DIR="-I /usr/local/share/aclocal"
elif [ -d /usr/share/aclocal ]; then
# Xcode installs aclocal macros here
ACLOCAL_DIR="-I /usr/share/aclocal"
--- a/sigrok-cli/configure.ac 2012-05-10 13:33:43.000000000 +0300
+++ b/sigrok-cli/configure.ac 2012-05-11 09:17:52.000000000 +0300
@@ -35,6 +35,7 @@
# We require at least automake 1.11 (needed for 'silent rules').
AM_INIT_AUTOMAKE([1.11 -Wall -Werror foreign std-options])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
+m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
AH_TOP([#ifndef SR_CONFIG_H
#define SR_CONFIG_H /* To stop multiple inclusions. */])
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
sigrok-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sigrok-devel