D vs nim

Parke via Digitalmars-d digitalmars-d at puremagic.com
Tue Apr 21 09:42:04 PDT 2015


> On Mon, 2015-04-20 at 13:05 -0700, Parke via Digitalmars-d wrote:
>> Nim includes an install.sh script.  It worked for me.

On Tue, Apr 21, 2015 at 1:28 AM, Russel Winder via Digitalmars-d
<digitalmars-d at puremagic.com> wrote:
> install.sh calls koch, both of these are created by running build.sh.
>
> Running koch builds the executable for installation which requires extra
> compilations one critical part of which does not happen. So the built
> system is fine but the installable version will not build.

How should I modify the following script to encounter the problems of
which you speak?

----

unzip -q nim-0.10.2.zip

cd nim-0.10.2
sh build.sh > /dev/null
sh install.sh ../install_dir

cd ../install_dir
echo 'echo "Hello, Nim world!"' > hello.nim
nim/bin/nim c hello.nim
echo
./hello

----

When I run the script on my Ubuntu system, I get the following:

$ sh -x nim_test.sh
+ unzip -q nim-0.10.2.zip
+ cd nim-0.10.2
+ sh build.sh
+ sh install.sh ../install_dir
Nim build detected
copying files...
installation successful
+ cd ../install_dir
+ echo echo "Hello, Nim world!"
+ nim/bin/nim c hello.nim
config/nim.cfg(45, 2) Hint: added path: '/home/bake/.babel/pkgs/' [Path]
config/nim.cfg(46, 2) Hint: added path: '/home/bake/.nimble/pkgs/' [Path]
Hint: used config file
'/usr/local/bake/tmp/install_dir/nim/config/nim.cfg' [Conf]
Hint: system [Processing]
Hint: hello [Processing]
CC: hello
CC: system
[Linking]
Hint: operation successful (8753 lines compiled; 1.230 sec total;
14.148MB) [SuccessX]
+ echo

+ ./hello
Hello, Nim world!


More information about the Digitalmars-d mailing list