I tried this on a Macintosh running Mac OS X version 10.5.6 (Leopard),
and the process failed in step 6, when doing "make all" in the runtime
directory:

MinasTirith:runtime palantir$ make all
gcc -c -Dunix -O2 -fno-defer-pop -fomit-frame-pointer -DTHREADED
-I/Users/palantir/sml/mosml/include -o interp.o interp.c
gcc -c -Dunix -O2 -fno-defer-pop -fomit-frame-pointer -DTHREADED
-I/Users/palantir/sml/mosml/include -o expand.o expand.c
gcc -c -Dunix -O2 -fno-defer-pop -fomit-frame-pointer -DTHREADED
-I/Users/palantir/sml/mosml/include -o fix_code.o fix_code.c
sed -n -e '/\/\* ML \*\//s/.* \([a-zA-Z0-9_][a-zA-Z0-9_]*\) *(.*/\1/p' \
                compare.c extern.c externcp.c floats.c gc_ctrl.c
hash.c intern.c interncp.c interp.c ints.c io.c lexing.c meta.c
parsing.c str.c sys.c mosml.c unix.c md5sum.c callback.c dynlib.c >
primitives2
sh -c 'if cmp -s primitives primitives2; \
        then rm primitives2; \
        else mv primitives2 primitives; \
        fi'
gcc -o camlrunm prims.o interp.o expand.o misc.o stacks.o fix_code.o
main.o fail.o signals.o freelist.o major_gc.o minor_gc.o memory.o
alloc.o roots.o compare.o ints.o floats.o str.o io.o extern.o
externcp.o intern.o interncp.o hash.o sys.o meta.o parsing.o lexing.o
gc_ctrl.o mosml.o unix.o runtime.o md5sum.o callback.o dynlib.o -lm
-L/Users/palantir/sml/mosml/lib -ldl
/usr/bin/ld: /usr/lib/gcc/i686-apple-darwin8/4.0.1/../../../libm.dylib
unknown flags (type) of section 6 (__TEXT,__literal16) in load command
0
/usr/bin/ld: /usr/lib/gcc/i686-apple-darwin8/4.0.1/../../../libdl.dylib
unknown flags (type) of section 6 (__TEXT,__literal16) in load command
0
/usr/bin/ld: /usr/lib/gcc/i686-apple-darwin8/4.0.1/../../../libSystem.dylib
unknown flags (type) of section 6 (__TEXT,__literal16) in load command
0
collect2: ld returned 1 exit status
make: *** [camlrunm] Error 1
MinasTirith:runtime palantir$ gcc --version
i686-apple-darwin8-gcc-4.0.1 (GCC) 4.0.1 (Apple Computer, Inc. build 5363)
. . .

Does anyone have an idea that might help?  Do I need a new version of
gcc?  Has anyone else had success performing this upgrade under
Leopard?

Thanks for helping.

Peter

On Fri, Apr 3, 2009 at 4:12 PM, Peter Vincent Homeier
<[email protected]> wrote:
> It turns out that the instructions Peter Sestoft sent you were
> slightly incomplete.
>
> In particular, before the 'make all' in steps 3 and 6, one must
> 'touch' the new files so that the make recognizes these are new
> versions of the files.  Crucially, in step 8, one should use
> './camlrunm' instead of 'camlrunm'; otherwise one would invoke the
> installed version and get a bus error, and may mistakenly think that
> the build went wrong in some inexplicable way, when it actually
> worked.
>
> Finally, when rebuilding HOL, make sure to first go through all of the
> subdirectories of tools and do either 'make clean' or 'Holmake clean'
> as appropriate, in order to clean out all the old object code produced
> by the prior version of mosml, and then do the normal 'mosml <
> tools/smart-configure.sml' followed by 'build cleanAll' and 'build'
> commands.
>
> May I suggest that these instructions be added to the HOL installation
> instructions at http://hol.sourceforge.net/InstallKananaskis.html?
>
> Here is the corrected version:
>
> ----------------------------------------------------------------------
>  0. Make a backup of your old mosml installation
>
>  1. Before unpacking the attached, make a build of mosml 2.01:
>
>     In mosml/src/ do    make clean world
>
>  2. Unpack the attached:
>
>     In mosml/src/ do    tar xvfz mosml-patch.tgz
>
>  3. Recompile the compiler to generate the new bytecode:
>
>     In mosml/src/compiler do    touch Patch.sml Reloc.sml
>                                 make all
>
>  4. Promote the compiler:
>
>     In mosml/src/compiler do    mv mosmllnk mosmlcmp ..
>
>     (I believe mosmllnk is unchanged, but promote for good measure)
>
>  5. Generate new bytecode for libraries, compiler and lexer by
>     recompiling:
>
>     In mosml/src/mosmllib do    make clean all
>     In mosml/src/compiler do    make clean all
>     In mosml/src/lex do         make clean all
>
>  6. Recompile the runtime:
>
>     In mosml/src/runtime do     touch expand.c fix_code.c interp.c
>                                 make all
>
>  7. Promote the runtime, compiler and lexer:
>
>     In mosml/src/runtime do     mv camlrunm ..
>     In mosml/src/compiler do    mv mosmllnk mosmlcmp ..
>     In mosml/src/lex do         mv mosmllex ..
>
>  8. Check that the top-level works:
>
>     In mosml/src do   ./camlrunm compiler/mosmltop -stdlib mosmllib
>
>     and evaluate some expressions.
>
>  9. Rebuild everything to check that the system is stable:
>
>     In mosml/src do   make clean world
>
>     Check that src/mosmlcmp = src/compiler/mosmlcmp
>                src/mosmllnk = src/compiler/mosmllnk
>                src/mosmllex = src/lex/mosmllex
>
> 10. Install
>
>     In mosml/src do   make install
>
> 11. Check that HOL builds.
> ----------------------------------------------------------------------
>
> Cheers, Peter
>
>
> On Wed, Oct 15, 2008 at 8:19 PM, Michael Norrish
> <[email protected]> wrote:
>> Peter Vincent Homeier wrote:
>>  > I also see this bug happen when trying to build examples/acl2/ml.
>>  >  However, this patch doesn't seem to build right on a Mac running OS X
>>  > (10.4) with the following gcc:
>>
>> Yes, I'm afraid the instructions in my post yesterday were far too
>> casual (not to mention wrong!).  I have Peter Sestoft's original here:
>>
>> ----------------------------------------------------------------------
>>  0. Make a backup of your old mosml installation
>>
>>  1. Before unpacking the attached, make a build of mosml 2.01:
>>
>>     In mosml/src/ do    make clean world
>>
>>  2. Unpack the attached:
>>
>>     In mosml/src/ do    tar xvfz mosml-patch.tgz
>>
>>  3. Recompile the compiler to generate the new bytecode:
>>
>>     In mosml/src/compiler do    make all
>>
>>  4. Promote the compiler:
>>
>>     In mosml/src/compiler do    mv mosmllnk mosmlcmp ..
>>
>>     (I believe mosmllnk is unchanged, but promote for good measure)
>>
>>  5. Generate new bytecode for libraries, compiler and lexer by
>>     recompiling:
>>
>>     In mosml/src/mosmllib do    make clean all
>>     In mosml/src/compiler do    make clean all
>>     In mosml/src/lex do         make clean all
>>
>>  6. Recompile the runtime:
>>
>>     In mosml/src/runtime do     make all
>>
>>  7. Promote the runtime, compiler and lexer:
>>
>>     In mosml/src/runtime do     mv camlrunm ..
>>     In mosml/src/compiler do    mv mosmllnk mosmlcmp ..
>>     In mosml/src/lex do         mv mosmllex ..
>>
>>  8. Check that the top-level works:
>>
>>     In mosml/src do   camlrunm compiler/mosmltop -stdlib mosmllib
>>
>>     and evaluate some expressions.
>>
>>  9. Rebuild everything to check that the system is stable:
>>
>>     In mosml/src do   make clean world
>>
>>     Check that src/mosmlcmp = src/compiler/mosmlcmp
>>                src/mosmllnk = src/compiler/mosmllnk
>>                src/mosmllex = src/lex/mosmllex
>>
>> 10. Install
>>
>>     In mosml/src do   make install
>>
>> 11. Check that HOL builds.
>> ----------------------------------------------------------------------
>
> --
> "In Your majesty ride prosperously
> because of truth, humility, and righteousness;
> and Your right hand shall teach You awesome things." (Psalm 45:4)
>



-- 
"In Your majesty ride prosperously
because of truth, humility, and righteousness;
and Your right hand shall teach You awesome things." (Psalm 45:4)

------------------------------------------------------------------------------
_______________________________________________
hol-info mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/hol-info

Reply via email to