Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Racket 5.3.3 #17901

Closed
wants to merge 1 commit into from

8 participants

@kavu

Here is bump of Racket to 5.3.3. Also there is couple of fixes for #16436, so we can build it and just run racket and raco.

What does fix commit looks like?

  1. We need 'libtool' dependency so we can use proper GNU libtool. XCode libtool doesn't have --mode=compile flag.
  2. Option with-docs — we can decrease build time disabling docs, and those who need the docs can enable it explicitly.
  3. xonx, shared, gracket — I've built Racket nearly 50 times to figure out that we need to remove this options. Racket needs some dylibs (for example libffi) during make install. But it can't link with system libraries, so it downloads them from http://download.racket-lang.org/libs/10/x86_64-macosx/. But I think something is broken and it wouldn't download libffi (that needs to be download for some Racket packages to be built) unless we choose to build gracket. Enabling xonx, shared will cause build to fail anyhow.
  4. After the installation I remove that dylibs, because Homebrew can't link properly. Also I remove *.app like DrRacket.

And after that we have working racket and raco but I'm sure, that some Racket packages linked with those downloaded dylibs will be broken.

P.S. I think those who want to use Racket on OS X should download official Racket.dmg.

@adamv
Owner

Leaning toward redacting this formula.

@cooljeanius

Leaning toward redacting this formula.

Why?

@oryband

:+1:
Any progress on this issue? I really prefer installing 5.3 via homebrew.

@kavu

@oryband, well, you can try to install updated Racket formula from my pull request:

https://raw.github.com/kavu/homebrew/d23512a8fe2e7e77f0eef2e667d3846630112ab3/Library/Formula/plt-racket.rb

If it works for you, you can try to convince @adamv not to delete this formula, but merge this PR.

@mikemcquaid
Owner

I wouldn't redact this just because of the DMG but the pull request description doesn't imply this is in a very good state (before or after).

@jackrusher

Why would you redact this formula?

@adamv
Owner

Because it doesn't work and there's a binary installer

@jackrusher

But it does work with kavu's patch, and some users -- myself included -- would prefer to install via a package manager.

@oryband

I just installed via @kavu 's repo and it worked perfectly.

I have a 2010 Macbook Pro 13", Mountain Lion.

~$ brew install https://raw.github.com/kavu/homebrew/d23512a8fe2e7e77f0eef2e667d3846630112ab3/Library/Formula/plt-racket.rb
######################################################################## 100.0%
==> Installing plt-racket dependency: libtool
==> Downloading http://ftpmirror.gnu.org/libtool/libtool-2.4.2.tar.gz
######################################################################## 100.0%
==> ./configure --prefix=/usr/local/Cellar/libtool/2.4.2 --program-prefix=g --en
==> make install
==> Caveats
In order to prevent conflicts with Apple's own libtool we have prepended a "g"
so, you have instead: glibtool and glibtoolize.
==> Summary
:beer: /usr/local/Cellar/libtool/2.4.2: 66 files, 2.2M, built in 46 seconds
==> Installing plt-racket
==> Downloading https://github.com/plt/racket/tarball/v5.3.3
######################################################################## 100.0%
==> ./configure --enable-lt=glibtool --prefix=/usr/local/Cellar/plt-racket/5.3.3
==> make
==> Installing may take a long time (~40 minutes)
==> make install
:beer: /usr/local/Cellar/plt-racket/5.3.3: 16234 files, 196M, built in 20.6 minutes
@kavu

@oryband, you know, I am not a Racket guru, I just fixed the formula so I can run racket and eval simple (+ 1 2), but I am really not sure that all the standart libraries will work properly. Could you reinstall my patched formula with -vd keys and look through the debug log for some errors during building process?

P.S. :beers:

@oryband

Here's the stderr output.
I can also paste the stdout, but it's ~1500 or so.

brew: superenv removed: -g -O2
ar: creating archive ../libmzgc.a
brew: superenv removed: -g -O2
brew: superenv removed: -Iinclude -Wall -g -g -O2
brew: superenv removed: -Iinclude -Wall -g -g -O2
brew: superenv removed: -Iinclude -Wall -g -g -O2
brew: superenv removed: -Iinclude -Wall -g -g -O2
brew: superenv removed: -Iinclude -Wall -g -g -O2
brew: superenv removed: -Iinclude -Wall -g -g -O2
brew: superenv removed: -Iinclude -Wall -g -g -O2
brew: superenv removed: -Iinclude -Iinclude -g -O2
brew: superenv removed: -Iinclude -Iinclude -g -O2
brew: superenv removed: -Iinclude -Wall -g -g -O2
/usr/bin/ranlib: file: .libs/libffi.a(ffi.o) has no symbols
/usr/bin/ranlib: file: .libs/libffi.a(darwin.o) has no symbols
ranlib: file: .libs/libffi.a(ffi.o) has no symbols
ranlib: file: .libs/libffi.a(darwin.o) has no symbols
brew: superenv removed: -g -O2
brew: superenv removed: -g -O2
brew: superenv removed: -g -O2
brew: superenv removed: -g -O2
brew: superenv removed: -g -O2
brew: superenv removed: -g -O2
brew: superenv removed: -g -O2
brew: superenv removed: -g -O2
brew: superenv removed: -g -O2
brew: superenv removed: -g -O2
brew: superenv removed: -g -O2
brew: superenv removed: -g -O2
brew: superenv removed: -g -O2
brew: superenv removed: -g -O2
brew: superenv removed: -g -O2
brew: superenv removed: -g -O2
brew: superenv removed: -g -O2
brew: superenv removed: -g -O2
brew: superenv removed: -g -O2
brew: superenv removed: -g -O2
brew: superenv removed: -g -O2
brew: superenv removed: -g -O2
brew: superenv removed: -g -O2
brew: superenv removed: -g -O2
brew: superenv removed: -g -O2
brew: superenv removed: -g -O2
brew: superenv removed: -g -O2
brew: superenv removed: -g -O2
brew: superenv removed: -g -O2
brew: superenv removed: -g -O2
brew: superenv removed: -g -O2
brew: superenv removed: -g -O2
brew: superenv removed: -g -O2
brew: superenv removed: -g -O2
brew: superenv removed: -g -O2
brew: superenv removed: -g -O2
brew: superenv removed: -g -O2
brew: superenv removed: -g -O2
brew: superenv removed: -g -O2
brew: superenv removed: -g -O2
brew: superenv removed: -g -O2
brew: superenv removed: -g -O2
brew: superenv removed: -g -O2
brew: superenv removed: -g -O2
brew: superenv removed: -g -O2
brew: superenv removed: -g -O2
brew: superenv removed: -g -O2
brew: superenv removed: -g -O2
brew: superenv removed: -g -O2
brew: superenv removed: -g -O2
brew: superenv removed: -g -O2
brew: superenv removed: -g -O2
brew: superenv removed: -g -O2
brew: superenv removed: -g -O2
brew: superenv removed: -g -O2
brew: superenv removed: -g -O2
brew: superenv removed: -g -O2
brew: superenv removed: -g -O2
/usr/bin/ranlib: file: libracket.a(unwind.o) has no symbols
/usr/bin/ranlib: file: libracket.a(darwin.o) has no symbols
/usr/bin/ranlib: file: libracket.a(ffi.o) has no symbols
ranlib: file: libracket.a(unwind.o) has no symbols
ranlib: file: libracket.a(darwin.o) has no symbols
ranlib: file: libracket.a(ffi.o) has no symbols
brew: superenv removed: -g -O2
brew: superenv removed: -g -O2
brew: superenv removed: -g -O2
brew: superenv removed: -g -O2
brew: superenv removed: -g -O2
brew: superenv removed: -g -O2
brew: superenv removed: -g -O2
brew: superenv removed: -g -O2
brew: superenv removed: -g -O2
brew: superenv removed: -g -O2
brew: superenv removed: -g -O2
brew: superenv removed: -g -O2
brew: superenv removed: -g -O2
brew: superenv removed: -g -O2
brew: superenv removed: -g -O2
brew: superenv removed: -g -O2
brew: superenv removed: -g -O2
brew: superenv removed: -g -O2
brew: superenv removed: -g -O2
brew: superenv removed: -g -O2
brew: superenv removed: -g -O2
brew: superenv removed: -g -O2
brew: superenv removed: -g -O2
brew: superenv removed: -g -O2
brew: superenv removed: -g -O2
brew: superenv removed: -g -O2
brew: superenv removed: -g -O2
brew: superenv removed: -g -O2
brew: superenv removed: -g -O2
brew: superenv removed: -g -O2
brew: superenv removed: -g -O2
brew: superenv removed: -g -O2
brew: superenv removed: -g -O2
brew: superenv removed: -g -O2
brew: superenv removed: -g -O2
brew: superenv removed: -g -O2
brew: superenv removed: -g -O2
brew: superenv removed: -g -O2
brew: superenv removed: -g -O2
brew: superenv removed: -g -O2
brew: superenv removed: -g -O2
brew: superenv removed: -g -O2
brew: superenv removed: -g -O2
brew: superenv removed: -g -O2
brew: superenv removed: -g -O2
brew: superenv removed: -g -O2
brew: superenv removed: -g -O2
brew: superenv removed: -g -O2
brew: superenv removed: -g -O2
brew: superenv removed: -g -O2
brew: superenv removed: -g -O2
brew: superenv removed: -g -O2
brew: superenv removed: -g -O2
brew: superenv removed: -g -O2
brew: superenv removed: -g -O2
brew: superenv removed: -g -O2
brew: superenv removed: -g -O2
brew: superenv removed: -g -O2
/usr/bin/ranlib: file: ../libracket3m.a(unwind.o) has no symbols
/usr/bin/ranlib: file: ../libracket3m.a(darwin.o) has no symbols
/usr/bin/ranlib: file: ../libracket3m.a(ffi.o) has no symbols
ranlib: file: ../libracket3m.a(unwind.o) has no symbols
ranlib: file: ../libracket3m.a(darwin.o) has no symbols
ranlib: file: ../libracket3m.a(ffi.o) has no symbols
brew: superenv removed: -g -O2
brew: superenv removed: -g -O2 -g -O2
racket: exec failed (No such file or directory; errno=2)
@cooljeanius

I can also paste the stdout, but it's ~1500 or so.

You can always make a gist for that

@oryband

Is this necessary? I'm just going to wait for this pull request to be merged. If you need anything else just let me know.

@adamv
Owner

If this is known not to compile for people I don't to pull it yet.

@oryband

Any updates?

@trevor

this worked for me:

require 'formula'

class PltRacket < Formula
  homepage 'http://racket-lang.org/'
  # Use GitHub tarball as the release tarball doesn't have
  # everything needed for building on OS X
  url 'https://github.com/plt/racket/archive/v5.3.4.tar.gz'
  sha1 'a004f838744009c729dc34744846e09022c0f0d7'

  depends_on 'libtool' => :build

  def install
    cd 'src' do
      args = ["--disable-debug", "--disable-dependency-tracking",
              "--enable-lt=glibtool",
              "--prefix=#{prefix}",
              "--enable-macprefix"]

      if MacOS.prefer_64_bit?
        args += ["--enable-mac64", "--enable-sgc"]
      end

      system "./configure", *args
      system "make"
      ohai "Installing may take a long time (~40 minutes)" unless ARGV.verbose?
      system "make install"
    end
  end
end

related with regard to enable-lt: plt/racket#337

@adamv
Owner

Can someone test @trevor 's change? It would take forever on this old MBP.

@trevor

@kavu this should essentially be the same as your changes, just a minor update to the racket version and :build for libtool. i don't have an opinion on removing the various binaries as i'm not familiar with this package, but i do like native builds over dmg for what it's worth.

amended to add: .app's could be kept and caveat added for brew linkapps

@adamv
Owner

5.3.4:

ranlib libracket.a
ranlib: file: libracket.a(unwind.o) has no symbols
ranlib: file: libracket.a(darwin.o) has no symbols
ranlib: file: libracket.a(ffi.o) has no symbols
/Applications/Xcode.app/Contents/Developer/usr/bin/make racketcgc
mkdir -p  Racket.framework/Versions/5.3.4
cc -o Racket.framework/Versions/5.3.4/Racket  -pthread -framework CoreFoundation -dynamiclib -all_load  libracket.a libmzgc.a -ldl -lm  -liconv
cc -I. -I./include -g -O2   -DOS_X -D_DARWIN_UNLIMITED_SELECT -pthread   -fno-common -DUSE_SENORA_GC  -DINITIAL_COLLECTS_DIRECTORY='"'"`cd ./../../collects; pwd`"'"' -c ./main.c -o main.o
brew: superenv removed: -g -O2
rm -f Racket.framework/Racket
ln -s Versions/5.3.4/Racket Racket.framework/Racket
cc -o racketcgc   -pthread main.o -Wl,-headerpad_max_install_names -F. -framework Racket -ldl -lm  -liconv
/usr/bin/install_name_tool -change "Racket.framework/Versions/5.3.4/Racket" "@executable_path/Racket.framework/Versions/5.3.4/Racket" "racketcgc"
/bin/sh: /usr/bin/install_name_tool: No such file or directory
make[4]: *** [racketcgc] Error 127
make[3]: *** [cgc] Error 2
make[2]: *** [3m] Error 2
make[1]: *** [3m] Error 2
make: *** [all] Error 2
==> Configuration
HOMEBREW_VERSION: 0.9.4
HEAD: 8709aa3a748a4db3fd894d824a52dceb8575c71b
HOMEBREW_PREFIX: /Users/vandenbe/brew
CPU: quad-core 64-bit sandybridge
OS X: 10.7.5-x86_64
Xcode: 4.6
X11: 2.6.5 => /usr/X11
@adamv
Owner

I'm on XCode only, no CLT, so it should be using xcrun.

@oryband

Does #20065 fix issue?

@MerelyAPseudonym

FYI, I just tried @kavu's formula and it built & installed just fine. However, I'd like to dig into the code and figure out if we can restrain Racket from trying to download files from http://download.racket-lang.org/libs/10/x86_64-macosx/

@adamv
Owner

Closing in favor of new work in #22420.

@adamv adamv closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Feb 17, 2013
  1. @kavu

    Racket 5.3.3

    kavu authored
This page is out of date. Refresh to see the latest.
Showing with 16 additions and 7 deletions.
  1. +16 −7 Library/Formula/plt-racket.rb
View
23 Library/Formula/plt-racket.rb
@@ -4,24 +4,33 @@ class PltRacket < Formula
homepage 'http://racket-lang.org/'
# Use GitHub tarball as the release tarball doesn't have
# everything needed for building on OS X
- url 'https://github.com/plt/racket/tarball/v5.2'
- sha1 'bb2c6b6504796a88dada10b510f040b5bbec7b2e'
+ url 'https://github.com/plt/racket/tarball/v5.3.3'
+ sha1 '2189e72f04d890e12fa9d2776fc74a6f1ecc2bf7'
+
+ depends_on :libtool
+
+ option 'with-docs', "Build with docs"
def install
cd 'src' do
- args = ["--disable-debug", "--disable-dependency-tracking",
- "--enable-xonx",
- "--enable-shared",
- "--prefix=#{prefix}" ]
+ args = [ "--disable-debug", "--disable-dependency-tracking",
+ "--enable-lt=glibtool",
+ "--prefix=#{prefix}",
+ "--enable-macprefix"]
+
+ args << "--disable-docs" unless build.include? 'with-docs'
if MacOS.prefer_64_bit?
- args += ["--enable-mac64", "--enable-sgc", "--disable-gracket"]
+ args += ["--enable-mac64", "--enable-sgc"]
end
system "./configure", *args
system "make"
ohai "Installing may take a long time (~40 minutes)" unless ARGV.verbose?
system "make install"
+
+ rm_rf Dir["#{prefix}/*.app", "#{prefix}/lib/{*.dylib,starter,buildinfo}"]
+ rm_rf Dir["#{prefix}/bin/*"] - Dir["#{prefix}/bin/{racket,raco}"]
end
end
end
Something went wrong with that request. Please try again.