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

brew formula broken #12

Closed
tristan-k opened this issue Aug 7, 2014 · 9 comments
Closed

brew formula broken #12

tristan-k opened this issue Aug 7, 2014 · 9 comments
Labels

Comments

@tristan-k
Copy link

$ brew install brew_install_dislocker.rb
Error: uninitialized constant BrewInstallDislocker
Please report this bug:
    https://github.com/Homebrew/homebrew/wiki/troubleshooting
/usr/local/Library/Homebrew/formulary.rb:15:in `const_get'
/usr/local/Library/Homebrew/formulary.rb:15:in `get_formula_class'
/usr/local/Library/Homebrew/formulary.rb:76:in `klass'
/usr/local/Library/Homebrew/formulary.rb:50:in `get_formula'
/usr/local/Library/Homebrew/formulary.rb:198:in `factory'
/usr/local/Library/Homebrew/extend/ARGV.rb:12:in `block in formulae'
/usr/local/Library/Homebrew/extend/ARGV.rb:12:in `map'
/usr/local/Library/Homebrew/extend/ARGV.rb:12:in `formulae'
/usr/local/Library/Homebrew/cmd/install.rb:27:in `install'
/usr/local/Library/brew.rb:131:in `<main>'
$ brew doctor
Your system is ready to brew.
@tristan-k
Copy link
Author

Forgot to install commandline developer tools with "xcode-select --install". After doing that I still get an error:

$ make
cc -Wall -Werror -Wextra -DPROGNAME=\"dislocker\" -DVERSION=\"0.3.1\" -D_FILE_OFFSET_BITS=64 -DAUTHOR="\"Romain Coltel\"" -D__OS=\"Darwin\" -D__ARCH=\"x86_64\" -D__ARCH_X86_64 -D__DARWIN -I. -I/usr/local/include -fstack-protector -fPIC -D_FORTIFY_SOURCE=2 -O1 -D__RUN_FUSE -DFUSE_USE_VERSION=26 -c -o outputs/fuse/fuse.o outputs/fuse/fuse.c
touch dislocker.c
cc -Wall -Werror -Wextra -DPROGNAME=\"dislocker\" -DVERSION=\"0.3.1\" -D_FILE_OFFSET_BITS=64 -DAUTHOR="\"Romain Coltel\"" -D__OS=\"Darwin\" -D__ARCH=\"x86_64\" -D__ARCH_X86_64 -D__DARWIN -I. -I/usr/local/include -fstack-protector -fPIC -D_FORTIFY_SOURCE=2 -O1 -D__RUN_FUSE -DFUSE_USE_VERSION=26 -c -o dislocker.o dislocker.c
cc -Wall -Werror -Wextra -DPROGNAME=\"dislocker\" -DVERSION=\"0.3.1\" -D_FILE_OFFSET_BITS=64 -DAUTHOR="\"Romain Coltel\"" -D__OS=\"Darwin\" -D__ARCH=\"x86_64\" -D__ARCH_X86_64 -D__DARWIN -I. -I/usr/local/include -fstack-protector -fPIC -D_FORTIFY_SOURCE=2 -O1 -D__RUN_FUSE -DFUSE_USE_VERSION=26 -c -o common.o common.c
cc -Wall -Werror -Wextra -DPROGNAME=\"dislocker\" -DVERSION=\"0.3.1\" -D_FILE_OFFSET_BITS=64 -DAUTHOR="\"Romain Coltel\"" -D__OS=\"Darwin\" -D__ARCH=\"x86_64\" -D__ARCH_X86_64 -D__DARWIN -I. -I/usr/local/include -fstack-protector -fPIC -D_FORTIFY_SOURCE=2 -O1 -D__RUN_FUSE -DFUSE_USE_VERSION=26 -c -o sectors.o sectors.c
cc -Wall -Werror -Wextra -DPROGNAME=\"dislocker\" -DVERSION=\"0.3.1\" -D_FILE_OFFSET_BITS=64 -DAUTHOR="\"Romain Coltel\"" -D__OS=\"Darwin\" -D__ARCH=\"x86_64\" -D__ARCH_X86_64 -D__DARWIN -I. -I/usr/local/include -fstack-protector -fPIC -D_FORTIFY_SOURCE=2 -O1 -D__RUN_FUSE -DFUSE_USE_VERSION=26 -c -o config.o config.c
cc -Wall -Werror -Wextra -DPROGNAME=\"dislocker\" -DVERSION=\"0.3.1\" -D_FILE_OFFSET_BITS=64 -DAUTHOR="\"Romain Coltel\"" -D__OS=\"Darwin\" -D__ARCH=\"x86_64\" -D__ARCH_X86_64 -D__DARWIN -I. -I/usr/local/include -fstack-protector -fPIC -D_FORTIFY_SOURCE=2 -O1 -D__RUN_FUSE -DFUSE_USE_VERSION=26 -c -o xstd/xstdio.o xstd/xstdio.c
cc -Wall -Werror -Wextra -DPROGNAME=\"dislocker\" -DVERSION=\"0.3.1\" -D_FILE_OFFSET_BITS=64 -DAUTHOR="\"Romain Coltel\"" -D__OS=\"Darwin\" -D__ARCH=\"x86_64\" -D__ARCH_X86_64 -D__DARWIN -I. -I/usr/local/include -fstack-protector -fPIC -D_FORTIFY_SOURCE=2 -O1 -D__RUN_FUSE -DFUSE_USE_VERSION=26 -c -o xstd/xstdlib.o xstd/xstdlib.c
cc -Wall -Werror -Wextra -DPROGNAME=\"dislocker\" -DVERSION=\"0.3.1\" -D_FILE_OFFSET_BITS=64 -DAUTHOR="\"Romain Coltel\"" -D__OS=\"Darwin\" -D__ARCH=\"x86_64\" -D__ARCH_X86_64 -D__DARWIN -I. -I/usr/local/include -fstack-protector -fPIC -D_FORTIFY_SOURCE=2 -O1 -D__RUN_FUSE -DFUSE_USE_VERSION=26 -c -o outputs/prepare.o outputs/prepare.c
cc -Wall -Werror -Wextra -DPROGNAME=\"dislocker\" -DVERSION=\"0.3.1\" -D_FILE_OFFSET_BITS=64 -DAUTHOR="\"Romain Coltel\"" -D__OS=\"Darwin\" -D__ARCH=\"x86_64\" -D__ARCH_X86_64 -D__DARWIN -I. -I/usr/local/include -I.. -fstack-protector -fPIC -D_FORTIFY_SOURCE=2 -O1 -c -o stretch_key.o stretch_key.c
cc -Wall -Werror -Wextra -DPROGNAME=\"dislocker\" -D__DARWIN -I/usr/include -I../.. -fstack-protector -fPIC -D_FORTIFY_SOURCE=2 -O1 -c -o read_bekfile.o read_bekfile.c
cc -Wall -Werror -Wextra -DPROGNAME=\"dislocker\" -D_FILE_OFFSET_BITS=64 -D__DARWIN -I/usr/include -I../../ -fstack-protector -fPIC -D_FORTIFY_SOURCE=2 -O1 -c -o recovery_password.o recovery_password.c
cc -Wall -Werror -Wextra -DPROGNAME=\"dislocker\" -D_FILE_OFFSET_BITS=64 -D__DARWIN -I/usr/include -I../../ -fstack-protector -fPIC -D_FORTIFY_SOURCE=2 -O1 -c -o user_pass.o user_pass.c
cc -Wall -Werror -Wextra -DPROGNAME=\"dislocker\" -D_FILE_OFFSET_BITS=64 -D__DARWIN -I/usr/include -I.. -fstack-protector -fPIC -D_FORTIFY_SOURCE=2 -O1 -D __ARCH_X86_64 -c -o metadata.o metadata.c
cc -Wall -Werror -Wextra -DPROGNAME=\"dislocker\" -D_FILE_OFFSET_BITS=64 -D__DARWIN -I/usr/include -I.. -fstack-protector -fPIC -D_FORTIFY_SOURCE=2 -O1 -D __ARCH_X86_64 -c -o print_metadata.o print_metadata.c
print_metadata.c:88:10: error: array index 55 is past the end of the array (which contains 7 elements) [-Werror,-Warray-bounds]
                return states_str[sizeof(states_str) - 1];
                       ^          ~~~~~~~~~~~~~~~~~~~~~~
print_metadata.c:28:1: note: array 'states_str' declared here
static const char* states_str[] =
^
1 error generated.
make[1]: *** [print_metadata.o] Error 1
make: *** [libs] Error 2

Aorimn added a commit that referenced this issue Aug 7, 2014
Sizeof(char*) != sizeof(char). This should suffice to understand the
commit.
@Aorimn
Copy link
Owner

Aorimn commented Aug 7, 2014

This second problem should be fixed now (commit 3fd3f45), I didn't know about the first one, thanks for sharing how to solve it.

@Aorimn Aorimn mentioned this issue Aug 7, 2014
@tristan-k
Copy link
Author

downloaded the latest developer brance, but still the same:

$ brew install brew_install_dislocker.rb 
Error: uninitialized constant BrewInstallDislocker
Please report this bug:
    https://github.com/Homebrew/homebrew/wiki/troubleshooting
/usr/local/Library/Homebrew/formulary.rb:15:in `const_get'
/usr/local/Library/Homebrew/formulary.rb:15:in `get_formula_class'
/usr/local/Library/Homebrew/formulary.rb:76:in `klass'
/usr/local/Library/Homebrew/formulary.rb:50:in `get_formula'
/usr/local/Library/Homebrew/formulary.rb:198:in `factory'
/usr/local/Library/Homebrew/extend/ARGV.rb:12:in `block in formulae'
/usr/local/Library/Homebrew/extend/ARGV.rb:12:in `map'
/usr/local/Library/Homebrew/extend/ARGV.rb:12:in `formulae'
/usr/local/Library/Homebrew/cmd/install.rb:27:in `install'
/usr/local/Library/brew.rb:131:in `<main

@Aorimn
Copy link
Owner

Aorimn commented Aug 7, 2014

Ok, so your second post here was for issue #11, I didn't understand that.

I don't have access to a Mavericks install at the moment, I'll try to fix that when I have.

@tristan-k
Copy link
Author

I'm sorry I mixed that up. The second comment should belong to issue #11

@Aorimn
Copy link
Owner

Aorimn commented Aug 7, 2014

No problem, as long as that's clear now.

@hugsy
Copy link

hugsy commented Aug 8, 2014

Correct brew file (tested on 10.9.4):

#
# this brew file *must* be called 'dislocker.rb' to match the Formula
#

require "formula"

class Dislocker < Formula
  homepage "https://github.com/Aorimn/dislocker"
  url "https://github.com/Aorimn/dislocker/archive/master.zip"
  sha1 "f366f788d5a79c975e553f496ffd4eadc8427b2a"
  version "0.3.1"

  depends_on "polarssl"
  depends_on "osxfuse"

  def install
    system "make -C src fuse"
    system "make -C src install INSTALL_PATH=#{prefix}/ MAN_PATH=#{prefix}/"
  end
end

When executed :

chris@bigmac:~/dislocker-develop/src % brew install dislocker.rb
==> Downloading https://github.com/Aorimn/dislocker/archive/master.zip
Already downloaded: /Library/Caches/Homebrew/dislocker-0.3.1.zip
==> make -C src fuse
==> make -C src install INSTALL_PATH=/usr/local/Cellar/dislocker/0.3.1/ MAN_PATH=/usr/local/Cellar/dislocker/0.3.1/ 
/usr/local/Cellar/dislocker/0.3.1: 6 files, 120K, built in 3 seconds

@Aorimn Aorimn added the bug label Aug 20, 2014
@gawbul
Copy link

gawbul commented Aug 29, 2014

@hugsy Worked great for me thanks!

steves-mbp:Downloads stevemoss$ brew config
HOMEBREW_VERSION: 0.9.5
ORIGIN: https://github.com/Homebrew/homebrew.git
HEAD: 531dae0f7104028cbb89b04d6cfd1ebad4cf8266
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
CPU: quad-core 64-bit ivybridge
OS X: 10.9.4-x86_64
Xcode: 5.1.1
Clang: 5.1 build 503
X11: 2.7.6 => /opt/X11
System Ruby: 2.0.0-451
Perl: /Users/stevemoss/perl5/perlbrew/perls/perl-5.20.0/bin/perl
Python: /Users/stevemoss/.pyenv/shims/python
Ruby: /Users/stevemoss/.rbenv/shims/ruby

steves-mbp:Downloads stevemoss$ brew reinstall dislocker.rb 
==> Reinstalling dislocker
==> Downloading https://github.com/Aorimn/dislocker/archive/master.zip
Already downloaded: /Library/Caches/Homebrew/dislocker-0.3.1.zip
==> make -C src fuse
==> make -C src install INSTALL_PATH=/usr/local/Cellar/dislocker/0.3.1/ MAN_PATH=/usr/local/Cellar/dislocker/0.3.1/
🍺  /usr/local/Cellar/dislocker/0.3.1: 6 files, 120K, built in 4 seconds

@Aorimn
Copy link
Owner

Aorimn commented Aug 30, 2014

@gawbul : thanks for testing
@hugsy : thanks for fixing the brew file

@Aorimn Aorimn closed this as completed Aug 30, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants