Dechenjm / crack-language

Automatically exported from code.google.com/p/crack-language
Other
0 stars 0 forks source link

OSX port #61

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Attempt to build 0.2.1 on Snow Leopard

What is the expected output? 

Build succeeds.

What do you see instead?

Build fails with:

==> Build Environment
CC: /usr/bin/cc => /usr/bin/gcc-4.2
CXX: /usr/bin/c++ => /usr/bin/c++-4.2
LD: /usr/bin/cc => /usr/bin/gcc-4.2
CFLAGS: -O3 -march=core2 -msse4.1 -w -pipe
CXXFLAGS: -O3 -march=core2 -msse4.1 -w -pipe
CPPFLAGS: -isystem /usr/local/homebrew/include
LDFLAGS: -L/usr/local/homebrew/lib
MAKEFLAGS: -j2
==> Downloading http://crack-language.googlecode.com/files/crack-0.2.1.tar.gz
File already downloaded and cached to /Users/sean/Library/Caches/Homebrew
/usr/bin/tar xf /Users/sean/Library/Caches/Homebrew/crack-0.2.1.tar.gz
==> ./configure --disable-dependency-tracking 
--prefix=/usr/local/homebrew/Cellar/crack/0.2.1
./configure --disable-dependency-tracking 
--prefix=/usr/local/homebrew/Cellar/crack/0.2.1
checking for a BSD-compatible install... /usr/local/homebrew/bin/ginstall -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/local/homebrew/bin/gmkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether /usr/bin/c++ accepts -g... yes
checking for style of include used by make... GNU
checking dependency style of /usr/bin/c++... none
checking for gcc... /usr/bin/cc
checking whether we are using the GNU C compiler... yes
checking whether /usr/bin/cc accepts -g... yes
checking for /usr/bin/cc option to accept ISO C89... none needed
checking dependency style of /usr/bin/cc... none
checking how to run the C preprocessor... /usr/bin/cc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for stdbool.h that conforms to C99... yes
checking for _Bool... yes
checking for an ANSI C-conforming const... yes
checking for ranlib... ranlib
checking build system type... i386-apple-darwin10.5.0
checking host system type... i386-apple-darwin10.5.0
checking for a sed that does not truncate output... /usr/bin/sed
checking for fgrep... /usr/bin/grep -F
checking for ld used by /usr/bin/cc... /usr/bin/cc
checking if the linker (/usr/bin/cc) is GNU ld... no
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm
checking the name lister (/usr/bin/nm) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 196608
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking for /usr/bin/cc option to reload object files... -r
checking for objdump... no
checking how to recognize dependent libraries... pass_all
checking for ar... ar
checking for strip... strip
checking for ranlib... (cached) ranlib
checking command to parse /usr/bin/nm output from /usr/bin/cc object... ok
checking for dsymutil... dsymutil
checking for nmedit... nmedit
checking for lipo... lipo
checking for otool... otool
checking for otool64... no
checking for -single_module linker flag... yes
checking for -exported_symbols_list linker flag... yes
checking for dlfcn.h... yes
checking whether we are using the GNU C++ compiler... (cached) yes
checking whether /usr/bin/c++ accepts -g... (cached) yes
checking dependency style of /usr/bin/c++... (cached) none
checking how to run the C++ preprocessor... /usr/bin/c++ -E
checking for objdir... .libs
checking if /usr/bin/cc supports -fno-rtti -fno-exceptions... yes
checking for /usr/bin/cc option to produce PIC... -fno-common -DPIC
checking if /usr/bin/cc PIC flag -fno-common -DPIC works... yes
checking if /usr/bin/cc static flag -static works... no
checking if /usr/bin/cc supports -c -o file.o... yes
checking if /usr/bin/cc supports -c -o file.o... (cached) yes
checking whether the /usr/bin/cc linker (/usr/bin/cc) supports shared 
libraries... yes
checking dynamic linker characteristics... darwin10.5.0 dyld
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for ld used by /usr/bin/c++... /usr/bin/cc
checking if the linker (/usr/bin/cc) is GNU ld... no
checking whether the /usr/bin/c++ linker (/usr/bin/cc) supports shared 
libraries... yes
checking for /usr/bin/c++ option to produce PIC... -fno-common -DPIC
checking if /usr/bin/c++ PIC flag -fno-common -DPIC works... yes
checking if /usr/bin/c++ static flag -static works... no
checking if /usr/bin/c++ supports -c -o file.o... yes
checking if /usr/bin/c++ supports -c -o file.o... (cached) yes
checking whether the /usr/bin/c++ linker (/usr/bin/cc) supports shared 
libraries... yes
checking dynamic linker characteristics... darwin10.5.0 dyld
checking how to hardcode library paths into programs... immediate
configure: creating ./config.status
config.status: creating Makefile
config.status: executing depfiles commands
config.status: executing libtool commands
==> make check install install-cracklib
make check install install-cracklib 
/bin/sh ./libtool  --tag=CXX   --mode=compile /usr/bin/c++ 
-DPACKAGE_NAME=\"crack\" -DPACKAGE_TARNAME=\"crack\" 
-DPACKAGE_VERSION=\"0.2.1\" -DPACKAGE_STRING=\"crack\ 0.2.1\" 
-DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"crack\" 
-DVERSION=\"0.2.1\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 
-DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 
-DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE__BOOL=1 
-DHAVE_STDBOOL_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -I.  
-DCRACKLIB=\"/usr/local/homebrew/Cellar/crack/0.2.1/lib/crack-0.2.1\" -isystem 
/usr/local/homebrew/include -I/usr/local/homebrew/include  -DNDEBUG 
-D_GNU_SOURCE -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -O3  
-fno-exceptions -fno-rtti -fno-common -Woverloaded-virtual -Wcast-qual 
-fexceptions -O3 -march=core2 -msse4.1 -w -pipe -c -o StrConst.lo `test -f 
'model/StrConst.cc' || echo './'`model/StrConst.cc
/bin/sh ./libtool  --tag=CXX   --mode=compile /usr/bin/c++ 
-DPACKAGE_NAME=\"crack\" -DPACKAGE_TARNAME=\"crack\" 
-DPACKAGE_VERSION=\"0.2.1\" -DPACKAGE_STRING=\"crack\ 0.2.1\" 
-DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"crack\" 
-DVERSION=\"0.2.1\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 
-DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 
-DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE__BOOL=1 
-DHAVE_STDBOOL_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -I.  
-DCRACKLIB=\"/usr/local/homebrew/Cellar/crack/0.2.1/lib/crack-0.2.1\" -isystem 
/usr/local/homebrew/include -I/usr/local/homebrew/include  -DNDEBUG 
-D_GNU_SOURCE -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -O3  
-fno-exceptions -fno-rtti -fno-common -Woverloaded-virtual -Wcast-qual 
-fexceptions -O3 -march=core2 -msse4.1 -w -pipe -c -o AssignExpr.lo `test -f 
'model/AssignExpr.cc' || echo './'`model/AssignExpr.cc
libtool: compile:  /usr/bin/c++ -DPACKAGE_NAME=\"crack\" 
-DPACKAGE_TARNAME=\"crack\" -DPACKAGE_VERSION=\"0.2.1\" 
"-DPACKAGE_STRING=\"crack 0.2.1\"" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" 
-DPACKAGE=\"crack\" -DVERSION=\"0.2.1\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 
-DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 
-DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 
-DHAVE__BOOL=1 -DHAVE_STDBOOL_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -I. 
-DCRACKLIB=\"/usr/local/homebrew/Cellar/crack/0.2.1/lib/crack-0.2.1\" -isystem 
/usr/local/homebrew/include -I/usr/local/homebrew/include -DNDEBUG 
-D_GNU_SOURCE -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -O3 
-fno-exceptions -fno-rtti -fno-common -Woverloaded-virtual -Wcast-qual 
-fexceptions -O3 -march=core2 -msse4.1 -w -pipe -c model/StrConst.cc  
-fno-common -DPIC -o .libs/StrConst.o
libtool: compile:  /usr/bin/c++ -DPACKAGE_NAME=\"crack\" 
-DPACKAGE_TARNAME=\"crack\" -DPACKAGE_VERSION=\"0.2.1\" 
"-DPACKAGE_STRING=\"crack 0.2.1\"" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" 
-DPACKAGE=\"crack\" -DVERSION=\"0.2.1\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 
-DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 
-DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 
-DHAVE__BOOL=1 -DHAVE_STDBOOL_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -I. 
-DCRACKLIB=\"/usr/local/homebrew/Cellar/crack/0.2.1/lib/crack-0.2.1\" -isystem 
/usr/local/homebrew/include -I/usr/local/homebrew/include -DNDEBUG 
-D_GNU_SOURCE -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -O3 
-fno-exceptions -fno-rtti -fno-common -Woverloaded-virtual -Wcast-qual 
-fexceptions -O3 -march=core2 -msse4.1 -w -pipe -c model/AssignExpr.cc  
-fno-common -DPIC -o .libs/AssignExpr.o
In file included from ./spug/Exception.h:28,
                 from ./parser/Parser.h:11,
                 from model/AssignExpr.cc:7:
./spug/TypeInfo.h: In static member function 'static spug::TypeInfoPtr 
spug::TypeInfo::get(const T&)':
./spug/TypeInfo.h:38: error: cannot use typeid with -fno-rtti

What version of the product are you using? On what operating system?

0.2.1 on Snow Leopard.

Please provide any additional information below.

I'm trying to make a homebrew formula and used homebrew to build the formula. 
Here's the formula:

require 'formula'

class Crack <Formula
  url 'http://crack-language.googlecode.com/files/crack-0.2.1.tar.gz'
  homepage 'http://code.google.com/p/crack-language/'
  sha1 'f2831789a276c4e5c6dbeeb4b4f71bf1bd41c77d'

  depends_on 'llvm'

  def install
    system "./configure", "--disable-dependency-tracking",
                          "--prefix=#{prefix}"
    system "make check install install-cracklib"
  end
end

Original issue reported on code.google.com by seanlyn...@gmail.com on 6 Jan 2011 at 7:47

GoogleCodeExporter commented 9 years ago
First off, thank you for attempting a Mac build!

It sounds to me like your llvm-config is probably publishing those -fno-rri and 
-fno-exceptions flags into our compile line.  What happens when you run 
"llvm-config --cflags"?

Original comment by mind...@gmail.com on 6 Jan 2011 at 10:05

GoogleCodeExporter commented 9 years ago
Thanks for the quick response! Here's what I get:

78,0 sean@Sean-Lynchs-MacBook-Pro:~$ llvm-config --cflags
-I/usr/local/homebrew/include  -DNDEBUG -D_GNU_SOURCE -D__STDC_LIMIT_MACROS 
-D__STDC_CONSTANT_MACROS -O3  -fno-common

-fno-rtti is mentioned in the configure script that comes in the tarball on 
line 8528:

if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
    lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"

I'm using llvm 2.8 from homebrew:

505,127 
sean@Sean-Lynchs-MacBook-Pro:/private/tmp/homebrew-crack-0.2.1-BkhJ/crack-0.2.1$
 llvmc --version
Low Level Virtual Machine (http://llvm.org/):
  llvm version 2.8
  Optimized build.
  Built Jan  2 2011 (12:08:25).
  Host: x86_64-apple-darwin10
  Host CPU: penryn

  Registered Targets:
    (none)

Original comment by seanlyn...@gmail.com on 6 Jan 2011 at 11:55

GoogleCodeExporter commented 9 years ago
hunh, that's interesting.  From a later part of configure, it looks like those 
options should be disabled for C++ code.

I'll investigate further, but as a work-around, try disabling that check in 
configure - this will at least move you forward to the next problem :-)

You're only about the third person I know of to attempt to build this on a mac, 
so it's extremely likely you're going to run into more problems.  While we're 
happy to try to help in any way we can, I have to warn you that you may have a 
struggle ahead of you.

Original comment by mind...@gmail.com on 7 Jan 2011 at 2:09

GoogleCodeExporter commented 9 years ago
No problem. I'll give that a shot sometime today and let you know what I run 
into next. I'm perfectly happy to be the Mac guinea pig.

Original comment by seanlyn...@gmail.com on 7 Jan 2011 at 6:35

GoogleCodeExporter commented 9 years ago
Ran into my next problem just trying to clone the Mercurial repository. 
Crack.cc and crack.cc collide on a case-preserving (vs case-sensitive) 
filesystem, and HFS+ is case-preserving. Filed Issue 62 for this.

Original comment by seanlyn...@gmail.com on 7 Jan 2011 at 7:00

GoogleCodeExporter commented 9 years ago
Thanks for attempting that - Shannon Weyrick is attempting a build on the Mac, 
you might want to chat with us on IRC at #crack-lang on freenode.net.  You guys 
might be able to collaborate.  We're currently working to release version 0.3, 
but if we can get Mac portability in there quickly I'm willing to delay the 
release for it.

I looked into the use of the rtti/no-exceptions options in our configure (it's 
injected by libtool) and I currently believe it to be a red-herring: if the 
libtool macros were generating these options, they should be preceded by 
"-fno-builtins" everywhere they are used, and they are not.

Can you take a look at your generated Makefile and see where these are used 
there?  It might give us a hint as to which part of the configuration is 
requesting them.

Also, I fumbled when I asked you for 'llvm-config --cflags', can you tell me 
the output of 'llvm-config --cxxflags'?

Original comment by mind...@gmail.com on 9 Jan 2011 at 3:42

GoogleCodeExporter commented 9 years ago
Aah, it's in there:

501,0 sean@Sean-Lynchs-MacBook-Pro:~$ llvm-config --cxxflags
-I/usr/local/homebrew/include  -DNDEBUG -D_GNU_SOURCE -D__STDC_LIMIT_MACROS 
-D__STDC_CONSTANT_MACROS -O3  -fno-exceptions -fno-rtti -fno-common 
-Woverloaded-virtual -Wcast-qual

And it's in LLVM_CXXFLAGS in the Makefile:

LLVM_CXXFLAGS = -I/usr/local/homebrew/include  -DNDEBUG -D_GNU_SOURCE 
-D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -O3  -fno-exceptions -fno-rtti 
-fno-common -Woverloaded-virtual -Wcast-qual

And in AM_CXXFLAGS:

AM_CXXFLAGS = -I/usr/local/homebrew/include  -DNDEBUG -D_GNU_SOURCE 
-D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -O3  -fno-exceptions -fno-rtti 
-fno-common -Woverloaded-virtual -Wcast-qual -fexceptions

Original comment by seanlyn...@gmail.com on 9 Jan 2011 at 4:37

GoogleCodeExporter commented 9 years ago
A new "osx" branch is available which contains changes specific to getting 
crack compiled on OSX. Currently it builds and some non-bootstrapped tests from 
the suite pass, but bootstrapped tests fail. This is under investigation, fixes 
will be pushed to the osx branch as they become available.

Original comment by weyrick on 14 Jan 2011 at 5:38

GoogleCodeExporter commented 9 years ago

Original comment by weyrick on 14 Jan 2011 at 5:43

GoogleCodeExporter commented 9 years ago

Original comment by mind...@gmail.com on 8 Apr 2011 at 1:31

GoogleCodeExporter commented 9 years ago
Moved this to 0.5, since we're clearly not going to get to it before the 
release.

Original comment by mind...@gmail.com on 8 Apr 2011 at 1:31

GoogleCodeExporter commented 9 years ago
update - this is once again being worked on. changes are going into default 
(trunk) branch now, not osx.

Original comment by weyrick on 26 Sep 2012 at 8:27

GoogleCodeExporter commented 9 years ago
Issue 119 has been merged into this issue.

Original comment by mind...@gmail.com on 8 Jan 2013 at 2:34