1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

BSD licensed C, C++ and Fortran compiler released.

Discussion in 'Off-Topic' started by da1, Jun 14, 2011.

  1. da1

    da1 Member

    Messages:
    756
    Likes Received:
    0
    Taken from the other forum , thx BSDfan666 :)

    http://www.pathscale.com/ekopath4-open-source-announcement
     
  2. SirDice

    SirDice Moderator Staff Member Moderator

    Messages:
    17,373
    Likes Received:
    1
    As far as I've been able to tell only parts of it have a permissive license. Mainly a few run-time libraries and the debugger. Can't find any licensing info about the rest.
     
  3. B0o-supermario

    B0o-supermario New Member

    Messages:
    20
    Likes Received:
    0
    So when will you guys throw gcc and replace it with something better? ;)
     
  4. da1

    da1 Member

    Messages:
    756
    Likes Received:
    0
    9.0 has LLVM/Clang (for the world/kernel)
     
  5. xibo

    xibo New Member

    Messages:
    383
    Likes Received:
    0
    When something "better" can build the ports. Right now clang is in HEAD and pcc in ports, both more "C compiler" than gcc, but you won't be able to build the majority of the ports with either of them.

    Also, there's no point to drop gcc as gcc can't be built by anything other then gcc, so once gcc is out of base you won't be able to build it via ports...

    Nevertheless this is promising. Especially the fact they're doing the non-direct compiler tools, too.
     
  6. knk

    knk New Member

    Messages:
    10
    Likes Received:
    0
    Had trouble finding that, too. The COPYING file in the compiler soure states:

    The debugger doesn't have a LICENSE ore COPYING file, though.

    Oh, and the source code can be found here: https://github.com/path64 (and, for what it's worth, the compiler builds fine and produces running binaries under FreeBSD).
     
  7. B0o-supermario

    B0o-supermario New Member

    Messages:
    20
    Likes Received:
    0
    @knk: Do you mean it isn't BSD licensed?
    IMHO apple won't change clang to GPL :)
     
  8. aragon

    aragon New Member

    Messages:
    2,031
    Likes Received:
    0
    From what I've gathered, the compiler is GPLv3, but the debugger and certain libraries are BSD licensed. Not very useful for the FreeBSD project, but a welcome addition to ports I'm sure. :)
     
  9. vertexSymphony

    vertexSymphony New Member

    Messages:
    79
    Likes Received:
    0
    libcxxrt is the library you're talking about: http://forums.freebsd.org/showthread.php?t=24015
    PathDB is the debugger you're talking about (CDDL'ed): https://github.com/path64/debugger
    And yes, the compiler seems GPLv3: https://github.com/path64/compiler/blob/master/COPYING

    Alex.
     
  10. Crivens

    Crivens Member

    Messages:
    825
    Likes Received:
    1
    I did not check that for some time. If it is true these days, this is imho a great opportunity to ask for a facepalming "WTF?" smily.
     
  11. LoZio

    LoZio New Member

    Messages:
    65
    Likes Received:
    0
    Hi,

    I'm writing a how-to to build ekopath. I can start the big build process with the steps I described here (http://www.gorlani.com/portal/Home/Articles/BuildingekopathonFreeBSD.aspx) but I stop at:
    Code:
    [ 33%] Generating pscrt-static-x86_64/memcpy_em64t_c.o
    
    ### Assertion failure at line 812 of /tmp/compiler/src/be/../common/util/id_map.h:
    ### Compiler Error in file /tmp/compiler/src/libpscrt/memcpy_em64t.c during Global Optimization -- Create AUX Symbol table phase:
    ### ID_MAP::Insert: displaced item not found in hash table.
    *** Error code 1
    
    Stop in /tmp/build.
    *** Error code 1
    
    Stop in /tmp/build.
    *** Error code 1
    
    Any ideas?
    Thanks

    Update: the only help from IRC channel is here:
    Code:
    (12.53.20) LoZio: Well, I read the readme and started build, but it stop here: ### Assertion failure at line 812 of
     /tmp/compiler/src/be/../common/util/id_map.h:
    (12.53.20) LoZio: ### Compiler Error in file /tmp/compiler/src/libpscrt/memcpy_em64t.c during Global Optimization -- Create AUX Symbol table
     phase:
    (12.53.20) LoZio: ### ID_MAP::Insert: displaced item not found in hash table.
    (12.53.20) LoZio: *** Error code 1
    (12.53.39) LoZio: this may be not FreeBSD specific
    (12.53.54) codestr0m: LoZio: ERRORPISSEDOFFATFBSDTRYAGAINANOTHERDAY
    Just before being banned from the channel. I think they should work a bit on their community support.
     
  12. expl

    expl New Member

    Messages:
    664
    Likes Received:
    0
    When people stop writing GCC optimized/specific code for their third-party software. And that's not going to happen any time soon as most open source developers are Linux users/fans.
     
  13. knk

    knk New Member

    Messages:
    10
    Likes Received:
    0
    Didn't get that error. If it helps, I build from bcb4f5366a5414b12f74fc136cf43e74c1162b10 and ran cmake like this:
    Code:
    #!/bin/sh
    
    GCCP=/usr/lib
    
       cmake -DCMAKE_BUILD_TYPE=Debug \
             -DPATH64_ENABLE_TARGETS="x86_64" \
             -DPATH64_ENABLE_MATHLIBS=ON \
             -DPATH64_ENABLE_FORTRAN=OFF \
             -DPSC_CRT_PATH_x86_64=/usr/lib \
             -DPSC_DYNAMIC_LINKER_x86_64=/libexec/ld-elf.so.1 \
             -DPSC_LIBSUPCPP_PATH_x86_64=$GCCP \
             -DPSC_LIBSTDCPP_PATH_x86_64=$GCCP \
             -DPSC_LIBGCC_PATH_x86_64=$GCCP \
             -DPSC_LIBGCC_EH_PATH_x86_64=$GCCP \
             -DPSC_LIBGCC_S_PATH_x86_64=$GCCP \
             ../compiler
    
     
  14. LoZio

    LoZio New Member

    Messages:
    65
    Likes Received:
    0
    Ok, I also was successful in preparing the make process also with my parameters. The problem is during the make process. Testing your command line, I can note you used Debug instead of Release. Using your command line the make process stops here:

    Code:
    [ 52%] Building CXX object src/be/be/CMakeFiles/be-exec-x8664.dir/__/com/phase.cxx.o
    make: don't know how to make /usr/local/lib/libdwarf.a. Stop
    *** Error code 2
    
    Stop in /tmp/build.
    *** Error code 1
    Using the git code downloaded 5 minutes ago:
    Code:
    commit c73993b29dac4d4f641ed09f0596679de49d509c
    Author: Roman Divacky <rdivacky@freebsd.org>
    Date:   Tue Jun 21 10:21:34 2011 +0200
    
    Using stock 8.2 compiler, gcc 4.2.1.

    --Edit
    Just tried my "recipe" and using "Release". It crashes with the same error, but at 18%:

    Code:
    [ 18%] Building CXX object src/be/be/CMakeFiles/be-exec-x8664.dir/__/com/phase.cxx.o
    make: don't know how to make /usr/local/lib/libdwarf.a. Stop
    *** Error code 2
    -- Edit (again :))
    7 minutes after posting this I googled to find infos about my stop error. I found this page as the first result. Just 7 minutes later. Am I the only one to find this amazing?
     
  15. cforger

    cforger New Member

    Messages:
    13
    Likes Received:
    0
    Hi,

    Using pkg_add -r libdwarf will get you past that error at 18%, I'm now stuck at 28% where you were stuck at 33% before:

    Code:
    [ 28%] Generating pscrt-static-x86_64/memcpy_em64t_c.o
    
    ### Assertion failure at line 812 of /root/work/path64/src/be/../common/util/id_map.h:
    ### Compiler Error in file /root/work/path64/src/libpscrt/memcpy_em64t.c during Global Optimization -- Create AUX Symbol table phase:
    ### ID_MAP::Insert: displaced item not found in hash table.
    *** Error code 1
    I checked this link https://github.com/path64/compiler/issues/6 , and it says we can't build a release with GCC, just a debug.

    I'm using the gorlani.com make line, with Debug instead of Release for the make build type. It's compiling now, we'll see where I end up tomorrow when I check.
     
  16. LoZio

    LoZio New Member

    Messages:
    65
    Likes Received:
    0
    It goes further, but not to the end.

    Code:
    [ 30%] Generating ../../lib/x8664/64/libmv.so
    /usr/bin/ld: /use/lib/crti.o: No such file: No such file or directory
    *** Error code 1
    It seems I'm missing a motion detection library from Google. I got it from https://github.com/libmv/libmv but it does not build.
     
  17. cforger

    cforger New Member

    Messages:
    13
    Likes Received:
    0
    I managed to get to 38% before it crashed asking about the Fortran compiler. I didn't run into your errors.

    Code:
    [ 38%] Generating pathfortran-static-x86_64/__/libfi/mathlb/ieee_exceptions_F90.o, pathfortran-static-x86_64/IEEE_EXCEPTIONS.mod
    gcc: /root/work/path64/src/libpathfortran/../libfi/mathlb/ieee_exceptions.F90: Fortran compiler not installed on this system
    *** Error code 1
    I believe that's a make switch option, I'll set it and try again.

    I'm running 9-CURRENT, built from 2011.05.28.15.00.00 on the csup src file.
     
  18. cforger

    cforger New Member

    Messages:
    13
    Likes Received:
    0
    Yup, that worked, I made it to 100%. I now have a shiny new compiler to play with on FreeBSD-9. Here's my cmake command that worked for me;

    set MYLIBPATH=/usr/lib

    Code:
    cmake ~/work/path64 \
    -DPATH64_ENABLE_TARGETS=x86_64 \
    -DPATH64_ENABLE_MATHLIBS=ON \
    -DPATH64_ENABLE_HUGEPAGES=OFF \
    -DPATH64_ENABLE_FORTRAN=OFF \
    -DPSC_CRT_PATH_x86_64=$MYLIBPATH \
    -DPSC_DYNAMIC_LINKER_x86_64=/libexec/ld-elf.so.1 \
    -DPSC_LIBSUPCPP_PATH_x86_64=$MYLIBPATH \
    -DPSC_LIBSTDCPP_PATH_x86_64=$MYLIBPATH \
    -DPSC_LIBGCC_PATH_x86_64=$MYLIBPATH \
    -DPSC_LIBGCC_EH_PATH_x86_64=$MYLIBPATH \
    -DPSC_LIBGCC_S_PATH_x86_64=$MYLIBPATH \
    -DPATH64_ENABLE_HUGEPAGES=OFF \
    -DCMAKE_BUILD_TYPE=Debug 
    Of course, it could refuse to compile even a 'hello world' program, we'll see as I start to test it. :)
     
  19. cforger

    cforger New Member

    Messages:
    13
    Likes Received:
    0
    Update:

    I have it compiling a basic "Hello World" program, and I'm even compiling a few of the smaller ports (TinyDNS for one) using pathcc.

    I notice that if I execute pathCC --help (the c++ version) I receive
    Code:
    Bus error (core dumped)
    error message about halfway through the help output dump. Probably not a good thing, but maybe it's just a silly error. I'm able to compile simple programs with pathCC or pathcc.

    I also notice that any port that uses configure doesn't like pathcc - It fails the c preprocessor tests.

    Code:
    checking for /opt/path64/bin/pathcc option to accept ANSI C... none needed
    checking for style of include used by make... GNU
    checking dependency style of /opt/path64/bin/pathcc... gcc3
    checking how to run the C preprocessor... /opt/path64/bin/pathCC
    configure: error: C preprocessor "/opt/path64/bin/pathCC" fails sanity check
    ===>  Script "configure" failed unexpectedly.
    Please report the problem to vd@FreeBSD.org [maintainer] and attach the
    "/usr/ports/net-mgmt/iftop/work/iftop-0.17/config.log" including the output
    of the failure of your make command. Also, it might be a good idea to provide
    an overview of all packages installed on your system (e.g. an `ls
    /var/db/pkg`).
    *** Error code 1
    The way I get around this is;
    - set /etc/make.conf back to the defaults (use gcc)
    - run make configure in the port to generate all the configure data
    - set /etc/make.conf to the pathcc files
    - make install

    Worked for iftop, and it runs. I'm going to keep playing with some of the ports and see how this works. I'm interested in samba35, as I've seen increased performance with gcc46 and -O3 optimization on my file servers, so there could be room for pathcc to help as well.

    Kernel:

    Being aggressively optimistic, I went for a buildkernel - And it's as messy as you'd expect. I know I won't receive help on it here, but others will want to try this, so I'm passing on what I'm finding.

    One option that is helpful for using pathcc as a drop-in for gcc is -woffoptions, the rest is manually ripped out of the kern.mk files, to see how far I can push this to compile.

    Where a buildworld dies today is:

    Code:
    ### Assertion failure at line 521 of /test/path64/src/be/cg/tnutil.cxx:
    ### Compiler Error in file /usr/src/sys/fs/nfsclient/nfs_clbio.c during Code_Expansion phase:
    ### don't know how to make dedicated TN for class (null)
    *** Error code 1
    
    Stop in /usr/obj/usr/src/sys/sankernel2.
    *** Error code 1
    
    Stop in /usr/src.
    *** Error code 1
    
    Stop in /usr/src.
    I see complaints about this on the Open64 compiler threads as well.

    We'll see how much time I have tomorrow to test this further.
     
  20. LoZio

    LoZio New Member

    Messages:
    65
    Likes Received:
    0
    The only difference is that you set no fortran support, I'm trying with the same settings.
    The last git code says:

    Code:
    commit 80b1b74250fd219b87ae74809172ca6b8f8363f5
    Author: Alexander Esilevich <aesilevich@pathscale.com>
    Date:   Wed Jun 22 18:02:30 2011 +0700
    
        added cmake option for path to libdwarf
    that is installed in /usr/lib by default, and I put the line on my cmake. Not setting it will stop build at 13%. Setting the path it stop just at 52%:

    Code:
    [ 52%] Building CXX object src/be/be/CMakeFiles/be-exec-x8664.dir/iter.cxx.o
    [ 52%] Building CXX object src/be/be/CMakeFiles/be-exec-x8664.dir/__/com/phase.cxx.o
    Linking CXX executable ../../../lib/x8664/be
    /usr/lib/libdwarf.so: undefined reference to `elf_strptr'
    /usr/lib/libdwarf.so: undefined reference to `elf_getident'
    I uninstalled the port version of libdwarf that is very old and compiled libdwarf-20110612 (that also is not easy). It reduces the number of errors in this phase, but the two above remain. I also installed LibElf with no luck.

    It's becoming very very tricky.
     
  21. cforger

    cforger New Member

    Messages:
    13
    Likes Received:
    0
    Hmm, it sounds like you should start with a fresh 8.2.

    Or better yet, try going up to a fresh install of 9-CURRENT - This is all pretty "testy-feely" anyway, and by the time you have something with Path64 stable enough to be using, 9 will be out anyway, so you may as well get a head-start on it. I'm finding my copies of 9 to be quite stable.

    I managed to build both istgt and samba35 with path64 last night, I'm setting up an environment for some small speed tests to see if there is a difference with path64 compiling these over gcc42 or gcc46.
     
  22. LoZio

    LoZio New Member

    Messages:
    65
    Likes Received:
    0
    I'm starting each time from a fresh/patched 8.2 x64 install, so messy installation is not likely. The (not so) strange thing is that every git commit results in different errors, having now "stabilized" the cmake string. I'll try with today's git and report.
    Bye.
     
  23. Yamagi

    Yamagi New Member

    Messages:
    6
    Likes Received:
    0
    Try the last "stable" version 4.0.10, tagged at june 08, 2011:
    Code:
    git clone https://github.com/path64/compiler.git
    cd compiler/
    git checkout 4.0.10
    
    This one builds for me with the cmake string from cforger. After this first stage pathcc can compile itself into a "Release" configuration:
    Code:
    setenv CC pathcc
    setenv CXX pathCC
    
    cmake ../compiler \
    -DCMAKE_INSTALL_PREFIX=/usr/opt/pathscale \
    -DPATH64_ENABLE_TARGETS=x86_64 \
    -DPATH64_ENABLE_MATHLIBS=ON \
    -DPATH64_ENABLE_HUGEPAGES=OFF \
    -DPATH64_ENABLE_FORTRAN=OFF \
    -DPSC_CRT_PATH_x86_64=$MYLIBPATH \
    -DPSC_DYNAMIC_LINKER_x86_64=/libexec/ld-elf.so.1 \
    -DPSC_LIBSUPCPP_PATH_x86_64=$MYLIBPATH \
    -DPSC_LIBSTDCPP_PATH_x86_64=$MYLIBPATH \
    -DPSC_LIBGCC_PATH_x86_64=$MYLIBPATH \
    -DPSC_LIBGCC_EH_PATH_x86_64=$MYLIBPATH \
    -DPSC_LIBGCC_S_PATH_x86_64=$MYLIBPATH \
    -DPATH64_ENABLE_HUGEPAGES=OFF \
    -DCMAKE_BUILD_TYPE=Release   
    
    I've uploaded the resulting binaries to: http://deponie.yamagi.org/freebsd/ekopath/ekopath_4.0.10_freebsd_8.2_amd64.tar.xz Extract in /usr/opt and add /usr/opt/pathscale/bin to your $PATH.
     
  24. LoZio

    LoZio New Member

    Messages:
    65
    Likes Received:
    0
    Thanks Yamagi for pointing out to checkout 4.0.10. I was able to build ekopath in debug and release (after an initial problem...).

    I updated the how-to with the final procedure (and credits :)) on http://www.gorlani.com/portal/Home/Articles/BuildingekopathonFreeBSD.aspx. Now I'm going to build some programs I use and compare results. I'll post them when done. Thanks again to all people on the thread.
     
  25. LoZio

    LoZio New Member

    Messages:
    65
    Likes Received:
    0
    I built my own release, and also tried yours, but it seems to have problems with ipa optimizations. If I compile with -Ofast or -ipa alone (also setting LDFLAGS), I get
    Code:
    /usr/opt/pathscale/lib/4.0.10/x8664/ipa_link: cannot open linker script file ldscripts/elf_x86_64_fbsd.xsc: No such file or directory
    
    Are you able to use ipa?