Building sbt with make for bootstraping

33 views
Skip to first unread message

Thomas Koch

unread,
Dec 12, 2011, 1:49:12 PM12/12/11
to simple-build-tool, Josh Suereth
Hi,

I've started today to learn about sbt and make in parallel and to write
ivy.xml and Makefile to build sbt without sbt.
If sbt should be packaged for Debian or any other free software distribution,
then it must be possible to build it without itself.

I've not managed too much yet[1]. It builds util/datatype and util/complete.

[1] https://github.com/thkoch2001/xsbt/tree/build-with-make

I just wanted to let you know about this (insane?) effort. Maybe somebody
wants to help? I don't know whether this is the best way or whether I'll have
the time to finish it.

Best regards,

Thomas Koch, http://www.koch.ro

Robin Green

unread,
Dec 13, 2011, 4:09:34 AM12/13/11
to simple-build-tool
On Dec 12, 6:49 pm, Thomas Koch <tho...@koch.ro> wrote:> If sbt should

be packaged for Debian or any other free software distribution,> then
it must be possible to build it without itself.
Are you sure about that? There are packages that (if I remember
correctly) absolutely require themselves to build, e.g. ghc and gcc.
Or do they have special exemptions, being compilers?

This message has been checked for all known viruses by the Postini Virus Control Centre.

Paul Phillips

unread,
Dec 13, 2011, 4:14:15 AM12/13/11
to simple-b...@googlegroups.com
On Tue, Dec 13, 2011 at 1:09 AM, Robin Green <robin...@ocado.com> wrote:
> There are packages that (if I remember
> correctly) absolutely require themselves to build, e.g. ghc and gcc.

Not to mention, good luck building scala without scala.

Thomas Koch

unread,
Dec 13, 2011, 4:25:33 AM12/13/11
to simple-b...@googlegroups.com, Robin Green
Robin Green:

>> On Dec 12, 6:49 pm, Thomas Koch <tho...@koch.ro> wrote:> If sbt should
>> be packaged for Debian or any other free software distribution,> then
>> it must be possible to build it without itself.

> Are you sure about that? There are packages that (if I remember
> correctly) absolutely require themselves to build, e.g. ghc and gcc.
> Or do they have special exemptions, being compilers?

Yes, I'm sure. There are a few things that have circular build dependencies
and cause headaches, but Debian Developers put great effort into minimalizing
those.[1] And there's absolutely no change that debian ftp-masters will accept
a comparably high level tool like sbt to introduce another circular
dependency.

[1] http://wiki.debian.org/DebianBootstrap

I just wrote anther mail, proposing to break up sbt into a minimal core and
the rest. This could be one way to solve this circular dependency problem.

Best regards

Thomas Koch, http://www.koch.ro

Thomas Koch

unread,
Dec 13, 2011, 4:30:31 AM12/13/11
to simple-b...@googlegroups.com, Paul Phillips
Paul Phillips:
Debian builds scala without scala.
http://anonscm.debian.org/gitweb/?p=pkg-
scala/packages/scala.git;a=tree;f=debian

Regards,

Thomas Koch, http://www.koch.ro

Jon-Anders Teigen

unread,
Dec 13, 2011, 5:10:49 AM12/13/11
to simple-b...@googlegroups.com
Sorry mate, but only Chuck Norris can build Scala without Scala..


/j

--
You received this message because you are subscribed to the Google Groups "simple-build-tool" group.
To post to this group, send email to simple-b...@googlegroups.com.
To unsubscribe from this group, send email to simple-build-t...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/simple-build-tool?hl=en.


Paul Phillips

unread,
Dec 13, 2011, 5:27:02 AM12/13/11
to simple-b...@googlegroups.com
On Tue, Dec 13, 2011 at 2:10 AM, Jon-Anders Teigen <jte...@gmail.com> wrote:
> Sorry mate, but only Chuck Norris can build Scala without Scala..
>
> Debian, like the rest of us builds Scala with
> Scala http://anonscm.debian.org/gitweb/?p=pkg-scala/packages/scala.git;a=blob;f=debian/simpbuild.xml;h=9e7a25495051e1741764318a721d68ec55184aea;hb=HEAD#l36

Most tellingly (and unavoidably),

36 <!-- Location of pre-compiled libraries -->
37 <property name="starr.lib.jar" value="${lib.dir}/scala-library.jar"/>
38 <property name="starr.comp.jar" value="${lib.dir}/scala-compiler.jar"/>

They're debian, they're not magical unicorns. Anyone who could build
scala without scala would have quite the interesting operation going,
with man-years of pointless work going into a secret reimplementation.
If there is stuff like that going on, hey people, consider tossing it
in and working on the real thing.

Thomas Koch

unread,
Dec 14, 2011, 9:37:50 AM12/14/11
to simple-b...@googlegroups.com, Josh Suereth
Hi,

I'm sorry, I made a fool of myself yesterday. Debian _does_ use scala to
compile scala. But this mistake only motivated me push harder trying to build
sbt _without_ sbt.
I pushed my current state[1]. I can now compile sbt from the Makefile. But
when I try to run it (see target _invoke in the Makefile) I get an exception:

[info] Set current project to default-ddd812 (in build
file:/home/thkoch/Desktop/checkouts/scala/xsbt/debian/boot/ivy-console/)
[error] (run-main) sbt.InvalidComponent: Could not find required component
'compiler-interface-src'
sbt.InvalidComponent: Could not find required component 'compiler-interface-
src'
at sbt.ComponentManager.invalid(ComponentManager.scala:57)
at sbt.ComponentManager.notFound$1(ComponentManager.scala:34)
at sbt.ComponentManager.createAndCache$1(ComponentManager.scala:37)
...

[1] https://github.com/thkoch2001/xsbt/tree/build-with-make

Do you have any idea, how I can continue? I run sbt directly from the .class
files, not from a .jar file.

I need to push sbinary, scalacheck and test-interface to Debian, before you
can try to run it yourself. Or you can change the repositories in
debian/sbt.boot.properties and ivysettings.xml.

Does anybody from the core devs run debian or a debian-derivative like ubuntu?

Indrajit Raychaudhuri

unread,
Dec 14, 2011, 9:39:44 AM12/14/11
to simple-b...@googlegroups.com, Josh Suereth
Thomas,

Just saw your branch. I assume this effort implies that the approach Josh took [1] isn't an option. In that case, would it be worthwhile to follow Maven's approach [2].

[1] https://github.com/paulp/sbt-extras/pull/12
[2] http://wiki.debian.org/Java/Maven2

- Indrajit

Thomas Koch

unread,
Dec 14, 2011, 9:55:10 AM12/14/11
to simple-b...@googlegroups.com, Indrajit Raychaudhuri, Josh Suereth
Indrajit Raychaudhuri:

> Thomas,
>
> Just saw your branch. I assume this effort implies that the approach Josh
> took [1] isn't an option. In that case, would it be worthwhile to follow
> Maven's approach [2].
>
> [1] https://github.com/paulp/sbt-extras/pull/12
> [2] http://wiki.debian.org/Java/Maven2
Hi Indrajit,

I have Josh in CC and hope that he could comment on this subject. I plan to do
sth. similar as described in the Maven link: Building sbt first with make and
then invoking it to build itself properly.

I've looked at Josh's work. As he stated himself in the pull request he's not
yet experienced in Debian package, so in short the approach taken does not
work for the official Debian archive. But I'd be looking forward to maintain
Sbt together with him.

Indrajit Raychaudhuri

unread,
Dec 14, 2011, 12:28:26 PM12/14/11
to tho...@koch.ro, simple-b...@googlegroups.com, Josh Suereth
Hi Thomas,

On Wednesday 14 December 2011 at 8:25 PM, Thomas Koch wrote:

Indrajit Raychaudhuri:
Thomas,

Just saw your branch. I assume this effort implies that the approach Josh
took [1] isn't an option. In that case, would it be worthwhile to follow
Maven's approach [2].

Hi Indrajit,

I have Josh in CC and hope that he could comment on this subject. I plan to do
sth. similar as described in the Maven link: Building sbt first with make and
then invoking it to build itself properly.
From the link I somehow gathered that to build maven you can start with ant instead of make. But either way, things shouldn't matter much. Based on #301 I though starting with ant would give more convenience in terms of classpath etc.


I've looked at Josh's work. As he stated himself in the pull request he's not
yet experienced in Debian package, so in short the approach taken does not
work for the official Debian archive. But I'd be looking forward to maintain
Sbt together with him.
Awesome! And then someone can do this for an RPM based distro as well :)

- Indrajit 

Indrajit Raychaudhuri

unread,
Dec 14, 2011, 2:07:14 PM12/14/11
to simple-b...@googlegroups.com
Hi Thomas,

You'll have to build the compileInterfaceSub project before getting into ivy related things. To know about the dependency hierarchy of the projects, you can refer to SBT's build file.

Also, I think building the just launcher should be a good start. Minimally, having the launcher (sbt-launcher) along with the shell script and a manpage would be it.

- Indrajit

Thomas Koch

unread,
Dec 14, 2011, 2:19:27 PM12/14/11
to simple-b...@googlegroups.com, Indrajit Raychaudhuri
Indrajit Raychaudhuri:

> Hi Thomas,
>
> You'll have to build the compileInterfaceSub project before getting into
> ivy related things. To know about the dependency hierarchy of the
> projects, you can refer to SBT's build file.
Hi Indrajit,

thank you, but I have compiled compile/interface. I've now pushed another
branch:
https://github.com/thkoch2001/xsbt/tree/compiled-with-make

Maybe you'd like to try launching it from there or have a look at what may be
missing? My classpath contains all folders in target/ plus the ivy
dependencies.

Josh Suereth

unread,
Dec 14, 2011, 2:27:35 PM12/14/11
to Indrajit Raychaudhuri, tho...@koch.ro, simple-b...@googlegroups.com
I'd certainly love to help maintain a .deb package.  I was planning to follow up my sbt-extras .deb distro with an RPM, since i've done RPM distros in the past.

I was also not planning on going into the debian main archives because of, what I consider, a needless requirement.   Requiring GPG signatures on artifacts is fine, and I hope to get SBT signed in the near future.   However, not allowing it to bootstrap to be included in debian is a bit silly IMHO.  I appreciate all the effort you're putting into this build, and I understand it's required for debian to allow us in.   I wish it was not, because the maintenance overhead of such a build is going to be rather large in the long run, and I know that I could not commit to such a burden.   I was planning to offer my own DEB repository for SBT packages to avoid the whole mess, but it looks like you're pretty close to having that part finished :)

I'll certainly help in any way to ensure a great SBT story on debian!   I'm trying to add  a few features to make things better, e.g. allowing /etc/ configuration for global SBT settings/plugins as well as user-override in ~/.sbt/

In any case, let me know how I can help.  

- Josh
Reply all
Reply to author
Forward
0 new messages