Skip to content

Instantly share code, notes, and snippets.

@jedi4ever
Created April 5, 2011 14:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jedi4ever/903711 to your computer and use it in GitHub Desktop.
Save jedi4ever/903711 to your computer and use it in GitHub Desktop.
Homebrew formula for rpmbuild
# Get nss formula
cd /usr/local/Library/Formula/
wget https://github.com/mbrunthaler/homebrew/raw/aa99a2c340bc81f3cb63fb14f35f7f3cc850769d/Library/Formula/nss.rb nss.rb
brew install libmagic
brew install nss (zie gist)
brew install popt
brew install nspr
brew install berkeley-db
brew install lua
mkdir $HOME/rpmbuild
cd $HOME/rpmbuild
wget http://rpm.org/releases/rpm-4.9.x/rpm-4.9.0.tar.bz2
tar -xjvf rpm-4.9.0.tar.bz2
cd rpm-4.9.0
# Patch 1
# remove the retrofit code for progname in system.h
# leave the external declaration
# Patch 2
# in lib/backend/db3.c
change fdatasync to fsync in the following part
void dbSetFSync(void *dbenv, int enable)
{
db_env_set_func_fsync(enable ? fsync : fsync_disable);
}
# Now configure it
./configure CFLAGS="-I/usr/local/include/nspr -I/usr/local/include/nss -I/usr/local/Cellar/libmagic/5.04/include" LDFLAGS="-L/usr/local/Cellar/libmagic/5.04/lib --with-external-db --prefix=/usr/local/rpm
# Make should succeed
make
# Make install (fails with dyld errors)
make install
dyld: lazy symbol binding failed: Symbol not found: _glob_pattern_p
Referenced from: /Users/patrick/v/p/rpm-4.9.0/rpmio/.libs/librpmio.2.dylib
Expected in: flat namespace
@quidryan
Copy link

Ah! The suspense is killing me. I get to the end and then start getting lazy symbol binding failed message. Now what? Did you ever figure it out?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment