liberty-eiffel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Liberty-eiffel] Bug #44601


From: Mehul Sanghvi
Subject: Re: [Liberty-eiffel] Bug #44601
Date: Mon, 13 Jun 2016 10:11:47 -0400


Yes that is true.  

Let me re-compile that again.  I had run make-germ.sh and it had deleted resources/smarteiffel-germ/*.c but nothing that a "git pull" can not fix.

Any other options that I need to be using when compiling compile_2_c and generating the germ with clang support ? 



cheers,

       mehul


On Mon, Jun 13, 2016 at 2:54 AM, Raphael Mack <address@hidden> wrote:
Hi,

but "a.out" was compiled without "-boost", right?

Regards,
Rapha

Zitat von Mehul Sanghvi <address@hidden>:

I got the assertion error using the following command line:

    bash% ../c2c-clang/a.out -verbose -boost -no_gc compile_to_c

As you can see the "-boost" option was used.



On Sun, Jun 12, 2016 at 4:04 PM, Raphael Mack <address@hidden>
wrote:

Please add "-boost" to the command line of c2c-germ.

In theory it should also go without, but the assertions in the compiler
are currently not 100% clean. And yes, we should have an ET stage,
compiling the compiler (and maybe a bit more) with an
assertions-enabled-compiler, but we're not there yet ;-(

And last but not least the compilation speed will increase very much!

Regards,
Rapha
Am Samstag, den 11.06.2016, 15:50 -0400 schrieb Mehul Sanghvi:
> I was able to get further but ran into an issue during the make-germ
> phase.  It failed during an assertion.  I've attached the output I was
> able to capture.
>
>
>
>
> cheers,
>
>
>        mehul
>
>
>
> On Sat, Jun 11, 2016 at 11:53 AM, Mehul Sanghvi
> <address@hidden> wrote:
>         Paolo,
>
>
>              Thanks for the pointer.  I'll replace it and go ahead and
>         see what I get out of it.
>
>
>               I agree in cleaning things up and getting rid of support
>         for systems that are not so widely used now.
>               Some of the compilers I haven't even seen being used in
>         the field in over a decade at the least, if not more.
>
>
>         cheers,
>
>
>               mehul
>
>
>
>         On Sat, Jun 11, 2016 at 1:06 AM, Paolo Redaelli
>         <address@hidden> wrote:
>                 Se is just a little front end to the other tools.
>
>                 You can safely replace "Se c2c" with the compile_to_c
>                 you have made.
>
>                 Btw I was chatting tonight with Hans... We must clean
>                 up this thing, removing support for things like Dos or
>                 Amiga os and adding more recent compilers.
>
>                 Il 11 giugno 2016 05:36:34 CEST, Mehul Sanghvi
>                 <address@hidden> ha scritto:
>
>                         I am trying to pick up on the work that I
>                         started for this.
>
>
>                         I believe I have completed Phase 1 from
>                         Cyrils' email below.  I have done the
>                         following:
>
>
>                            cd resources/smarteiffel_germ
>                            rm *.o
>                            gcc *.c -o c2c-germ
>
>
>                            cd ..
>                            mkdir c2c-clang
>                            cd c2c-clang
>                            ../smarteiffel_germ/c2c-germ -cc gcc
>                         compile_to_c
>
>
>
>
>                         Now in trying to do Phase 2, step 2:
>
>
>                                go to resources/smarteiffel_germ, and
>                         build a new germ using the make_germ.sh script
>
>
>                         there is one slight problem.   I do not have a
>                         "se"  yet, so the make_germ.sh will not work
>                         for me since it uses "se"
>                         to generate the new germ.  Any thoughts or
>                         suggestions on getting around this ?
>
>
>
>
>                         cheers,
>
>
>                              mehul
>
>
>
>
>
>                         On Fri, Mar 25, 2016 at 4:15 AM, Cyril ADRIAN
>                         <address@hidden> wrote:
>                                 Hi,
>
>
>                                 Adding a new C compiler support is
>                                 quite complex, because Liberty cannot
>                                 use clang as long as it does not know
>                                 it, and you cannot compile Liberty
>                                 until it knows clang. Classical
>                                 chicken-and-egg problem :-)
>
>
>                                 You must break the circle. Do it in
>                                 two phases:
>
>
>                                 Phase 1 – bootstrap
>
>
>
>                                 In this phase, you have to manually
>                                 build the compiler to make it aware of
>                                 clang.
>
>
>
>                                 1- add clang support in SYSTEM_TOOLS—
>                                 no need to change the configuration
>                                 files just yet
>
>                                 2- generate the C files of
>                                 compile_to_c, using compile_to_c;
>                                 compile those files using your C
>                                 compiler
>                                 se c2c compile_to_c
>
>                                 cc *.c -o bin/compile_to_c
>
>                                 3- generate the C files of compile,
>                                 using compile_to_c; compile those
>                                 files using your C compiler
>                                 se c2c compile
>
>                                 cc *.c -o bin/compile
>
>
>
>                                 (I don't know clang; you may have to
>                                 adapt the command lines)
>
>
>
>                                 Phase 2 – germ & install
>
>
>
>                                 In this phase, you build a "germ"
>                                 which is the C files of compile_to_c;
>                                 that germ is used to bootstrap the
>                                 installation process.
>
>
>                                 Then you launch the installer, which
>                                 starts by performing a "T3" which is a
>                                 standard procedure for compiler
>                                 bootstrap, to ensure that the compiler
>                                 compilation is stable: after at most 3
>                                 iterations the executable generation
>                                 must reach a fixed point.
>                                 See:
>
https://en.wikipedia.org/wiki/Bootstrapping_%28compilers%29#The_chicken_and_egg_problem
https://en.wikipedia.org/wiki/Tombstone_diagram
>
>
>
>                                 1- fix the configuration files to add
>                                 the Darwin / clang support
>
>                                 2- go to resources/smarteiffel_germ,
>                                 and build a new germ using the
>                                 make_germ.sh script
>
>                                 3- launch the installer
>
>
>
>                                 When all of this works, you can commit
>                                 your changes, esp. the germ.
>
>
>
>                                 Hope it helps :-)
>
>
>                                 Cheers
>
>
>                                 2016-03-25 1:05 GMT+01:00 Mehul
>                                 Sanghvi <address@hidden>:
>                                         Latest diffs and install log
>                                         attached.  I run into the
>                                         following issue:
>
>
>
>
>                                         ~~~~ germ: strip a.out ~~~~
>                                         Thu Mar 24 19:45:45 EDT 2016 -
>                                         strip a.out
>                                         ~~~~ T1: compile_to_c ~~~~
>                                         Thu Mar 24 19:45:47 EDT 2016
>                                         - ./compile_to_c -verbose
>                                         -boost -no_gc compile_to_c -o
>                                         compile_to_c.new
>
>
>                                         Liberty Eiffel The GNU Eiffel
>                                         Compiler, Eiffel tools and
>                                         libraries
>                                             release 2016.dev
>                                         (Alexander Graham Bell)
>
>
>                                         Copyright (C), 2011-2015 -
>                                         C.ADRIAN, P.REDAELLI, R.MACK
>
>                                         http://www.liberty-eiffel.org
>
>
>                                         Original SmartEiffel code:
>                                         Copyright (C), 1994-2002 -
>                                         INRIA - LORIA - ESIAL UHP
>                                         Nancy 1 - FRANCE
>                                         Copyright (C), 2003-2005 -
>                                         INRIA - LORIA - IUT
>                                         Charlemagne Nancy 2 - FRANCE
>                                         D.COLNET, P.RIBET, C.ADRIAN,
>                                         V.CROIZIER, F.MERIZEN
>
>                                         http://smarteiffel.loria.fr
>
>
>                                         Configuration chain (the lower
>                                         the more specific):
>
>                                         *
/Users/msanghvi/.config/liberty-eiffel
>
>                                         >
/Users/msanghvi/.config/liberty-eiffel/liberty.se
>
>
>                                         System is "UNIX", flavor
>                                         "Darwin".
>                                         C mode "boost" (default mode)
>                                         selected.
>                                         Unknown compiler type "clang"
>                                         Currently handled compiler
>                                         names:
>                                         gcc
>                                         g++
>                                         lcc-win32
>                                         cc
>                                         wcl386
>                                         bcc32
>                                         cl
>                                         sc
>                                         dice
>                                         vbcc
>                                         ccc
>                                         vpcc
>                                         OpenVMS_CC
>                                         tcc
>                                         distcc
>                                         ./compile_to_c failed with
>                                         status 1
>
>
>                                         I did modify
>                                         kernel/system_tools.e file to
>                                         include clang, but still got
>                                         the error.  Feel free to let
>                                         me know what I missed and
>                                         where I went wrong.
>
>
>
>
>                                         cheers,
>
>
>                                                mehul
>
>
>
>                                         On Thu, Mar 24, 2016 at 6:01
>                                         PM, Mehul Sanghvi
>                                         <address@hidden>
>                                         wrote:
>                                                 I took a look and it
>                                                 seems /usr/bin/gcc,
/usr/bin/g++, and /usr/bin/clang are all the same size, but gcc and g++ are
not links to it.  They might be hard links, though the md5 and shasum for
all three are different.
>
>
>                                                 /usr/bin/cc /usr/bin/c
>                                                 ++ /usr/bin/CC are
>                                                 symbolic links
>                                                 to /usr/bin/clang.
>
>
>                                                 It is possible to have
>                                                 GCC or CLANG on a
>                                                 Linux system, though
>                                                 we can keep it simple
>                                                 enough for now, and
>                                                 say that on Linux we
>                                                 use GCC and on Darwin
>                                                 we use CLANG.
>
>
>                                                 I'll make the
>                                                 adjustments to the
>                                                 other places I missed
>                                                 and resend the logs,
>                                                 along with newer
>                                                 diffs.
>
>
>
>
>
>                                                 On Thu, Mar 24, 2016
>                                                 at 4:47 PM, Raphael
>                                                 Mack
>                                                 <address@hidden>
wrote:
>                                                         Hi,
>
>                                                         In the logs I
>                                                         see:
>
>                                                         310: Thu Mar
>                                                         24 07:07:45
>                                                         EDT 2016
>                                                         - ./compile_to_c
-verbose -boost
>                                                         -no_gc
>                                                         compile_to_c
>                                                         -o
>                                                         compile_to_c.new
>
>                                                         This is
>                                                         calling the
>                                                         germ-compiler
>                                                         to compile the
>                                                         compiler from
>                                                         Eiffel
>                                                         code.
>                                                         Afterwards you
>                                                         see (after
>                                                         many verbose
>                                                         Eiffel
>                                                         compiler
>                                                         output
>                                                         lines):
>
>                                                         4878: clang:
>                                                         warning:
>                                                         argument
>                                                         unused during
>                                                         compilation:
>                                                         '-fno-gcse'
>
>                                                         5000: Thu Mar
>                                                         24 07:08:57
>                                                         EDT 2016 - gcc
>                                                         -Xlinker
>                                                         -no-as-needed
>                                                         -o
>                                                         compile_to_c.new
compile_to_c1.o  [...] compile_to_c135.o -x none
>                                                         5001: ld:
>                                                         unknown
>                                                         option:
>                                                         -no-as-needed
>                                                         5002: clang:
>                                                         error: linker
>                                                         command failed
>                                                         with exit code
>                                                         1 (use -v to
>                                                         see
>                                                         invocation)
>
>                                                         Which both
>                                                         reminds of the
>                                                         change you
>                                                         made in
>
 smarteiffel-germ/compile_to_c.make...
>                                                         install.sh
>                                                         generates a
>                                                         liberty-eiffel
>                                                         config file
>                                                         liberty.se
>                                                         from which
>                                                         the compiler
>                                                         options are
>                                                         read, so you
>                                                         should change
>                                                         these
>                                                         accordingly,
>                                                         and it could
>                                                         work.
>
>                                                         Also it seems,
>                                                         that your
>                                                         system doesn't
>                                                         use GCC, but
>                                                         CLANG (and gcc
>                                                         is a
>                                                         link to clang,
>                                                         right) and the
>                                                         changes seem
>                                                         to be directly
>                                                         related to
>                                                         this
>                                                         difference and
>                                                         I suggest to
>                                                         make the
>                                                         changes such
>                                                         that the
>                                                         options
>                                                         are omitted
>                                                         only for clang
>                                                         - and then
>                                                         also clang
>                                                         binary can be
>                                                         used.
>                                                         Maybe we can
>                                                         add a variable
>                                                         in the
>
 "compile_to_c.make" (and all the
>                                                         generated .make
command files) and install.sh to be set to "gcc -pipe
>                                                         -O2 -fno-gcse
>                                                         -c -x c" in
>                                                         case of gcc
>                                                         and "clang
>                                                         -pipe -O2 -c
>                                                         -x c " for
>                                                         clang, and use
>                                                         the same
>                                                         command for
>
 liberty.se-generation in install.sh
>
>                                                         (similar for
>                                                         the linker and
>                                                         the options)
>
>                                                         Regards,
>                                                         Rapha
>
>                                                         Am Donnerstag,
>                                                         den
>                                                         24.03.2016,
>                                                         10:23 -0400
>                                                         schrieb Mehul
>                                                         Sanghvi:
>                                                         > Re-sending
>                                                         the log file
>                                                         and diff, this
>                                                         time
>                                                         compressed :)
>                                                         >
>                                                         >
>                                                         >
>                                                         >
>                                                         >
>                                                         >
>                                                         > cheers,
>                                                         >
>                                                         >
>                                                         >       mehul
>                                                         >
>                                                         >
>                                                         >
>                                                         > On Thu, Mar
>                                                         24, 2016 at
>                                                         9:51 AM, Mehul
>                                                         Sanghvi
>                                                         >
>                                                         <
address@hidden> wrote:
>                                                         >         I
>                                                         knew I was
>                                                         forgetting
>                                                         something :)
>                                                         >
>                                                         >
>                                                         >
>                                                         >
>                                                         >         I
>                                                         had looked at
>                                                         the log file,
>                                                         but had not
>                                                         seen anything
>                                                         that
>                                                         >         made
>                                                         sense to me.
>                                                         >
>                                                         >
>                                                         >         I've
>                                                         attached a
>                                                         diff of the
>                                                         changes I've
>                                                         made and the
>                                                         install
>                                                         >         log
>                                                         file.
>                                                         >
>                                                         >
>                                                         >
>                                                         >
>                                                         >
>                                                          cheers,
>                                                         >
>                                                         >
>                                                         >
>                                                            mehul
>                                                         >
>                                                         >
>                                                         >
>                                                         >         On
>                                                         Thu, Mar 24,
>                                                         2016 at 2:54
>                                                         AM, Cyril
>                                                         ADRIAN
>                                                         >
>                                                          <
address@hidden> wrote:
>                                                         >
>                                                              The
>                                                         installer
>                                                         gives you a
>                                                         hint:
>                                                         >
>                                                         >
>                                                              Please
>                                                         look
>                                                         >
>
>                                                          at
/usr/local/src/liberty-eiffel/target/log/install-20160310-003957.log
>                                                         >
>                                                         >
>                                                         >
>                                                         >
>                                                              Do that,
>                                                         or share the
>                                                         file so
>                                                         someone can
>                                                         have a look.
>                                                         >
>                                                         >
>                                                         >
>                                                         >
>                                                              Cheers,
>                                                         >
>                                                         >
>                                                         >
>
>                                                          2016-03-24
>                                                         2:10 GMT+01:00
>                                                         Mehul Sanghvi
>                                                         >
>
>                                                          <
address@hidden>:
>                                                         >
>
>                                                          The problem
>                                                         seems to be
>                                                         here:
>                                                         >
>                                                         >
>                                                         >
>
>                                                            progress 30
>                                                         1
>                                                         $MAXTOOLCOUNT
>                                                         "T1:
>                                                         >
>
>                                                          compile_to_c"
>                                                         >
>
>
>                                                          run
./compile_to_c -verbose -boost -no_gc
>                                                         >
>
>                                                          compile_to_c
>                                                         -o
>                                                         compile_to_c.new
|| exit 1
>                                                         >
>                                                         >
>                                                         >
>
>
compile_to_c.new is not created it seems and
>                                                         >
>
>                                                          the return
>                                                         code is 0 so
>                                                         it does not
>                                                         exit.
>                                                         >
>                                                         >
>                                                         >
>
>                                                          This is using
>                                                         the native OS
>                                                         X compiler
>                                                         >
>
>                                                          in /usr/bin/gcc.
>                                                         >
>                                                         >
>                                                         >
>                                                                      I
>                                                         am going to
>                                                         see if I can
>                                                         get a
>                                                         different set
>                                                         >
>
>                                                          of results
>                                                         using gcc-5
>                                                         from macports.
>                                                         >
>                                                         >
>                                                         >
>                                                         >
>                                                         >
>                                                         >
>
>                                                          On Wed, Mar
>                                                         23, 2016 at
>                                                         8:16 PM, Mehul
>                                                         Sanghvi
>                                                         >
>
>                                                          <
address@hidden> wrote:
>                                                         >
>
>                                                                I had
>                                                         time to work
>                                                         on this today
>                                                         and
>                                                         >
>
>                                                                was at
>                                                         the point
>                                                         where I am at
>                                                         the
>                                                         >
>
>
>                                                          following
>                                                         stage:
>                                                         >
>                                                         >
>                                                         >
>                                                         >
>                                                         >
>
>
>                                                          % ./install.sh
>                                                         >
>                                                         >
>
>
>                                                          Checking BDW



--
Mehul N. Sanghvi
email: address@hidden

reply via email to

[Prev in Thread] Current Thread [Next in Thread]