Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 8 Jul 2016 17:13:04 +0800
From:      Raymond Cheung <korekontakt@gmail.com>
To:        Jan Beich <jbeich@vfemail.net>
Cc:        ports@freebsd.org, Kurt Jaeger <lists@opsec.eu>, Torsten Zuehlsdorff <tz@freebsd.org>
Subject:   Re: Torch7 ports (Was: Wxlua / Zbstudio)
Message-ID:  <CAFGnCTYRBm9Orm-fb5-VdHRinc7nwHJasuJRAQvsHhP213Da3w@mail.gmail.com>
In-Reply-To: <CAFGnCTZWfezJ9u73aSedP87D3KW8rrN5nyi8FRGDbbP6yAVaHg@mail.gmail.com>
References:  <CAFGnCTa_kmYuK6_pmx0eksV%2BX5fazF04dgaH=fGZXUeJWzdy7Q@mail.gmail.com> <CAFGnCTY2z2PFSHkvC_aOQ0HqmP3cibD95hndXQD2yqoSHPjUMQ@mail.gmail.com> <20160609190710.GT41922@home.opsec.eu> <CAFGnCTaYVBmZ-y-AfhMF0mtY1NrKioP0s=3Dmo7aftkiabnXnA@mail.gmail.com> <9f300278-31ab-bc50-1fc7-8e7e6dc44215@toco-domains.de> <CAFGnCTYe13XHjM1-sEHKUpopy_k_ZyXRd%2Bk8rFUX5VkHDXuKYA@mail.gmail.com> <d29c29f2-1ab4-53a5-c571-dc1296e287df@toco-domains.de> <CAFGnCTZPML32ndHBVNeW%2BGcecwNFCZon7qt1sOJLAGz8nObn2w@mail.gmail.com> <a097df53-16c4-9ed1-f6d8-cb923edd64c8@FreeBSD.org> <8txv-34vw-wny_-_@vfemail.net> <CAFGnCTY63TfEj1Q0=%2B9fY6AT3vBM%2B6Q0pSrUsNWtdC6M0xFrRQ@mail.gmail.com> <CAFGnCTaysmOJ9PoT4mX6gamxt%2BuMkkcZBL8vn73CzxL=-gdW8A@mail.gmail.com> <CAFGnCTZWfezJ9u73aSedP87D3KW8rrN5nyi8FRGDbbP6yAVaHg@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
I found the solution by use gcc.

https://lists.freebsd.org/pipermail/freebsd-toolchain/2014-April/001150.html

On install.sh, add
export LD_LIBRARY_PATH=/usr/local/lib/gcc48:$LD_LIBRARY_PATH
export CC=gcc
export CXX=g++

On trepl-scm-1.rockspec, add
      unix = {
    modules = {
   ['readline'] = {
               sources = {'readline.c'},
               libraries = {'readline'},
               incdirs = {"/usr/local/include"},
               libdirs = {"/usr/local/lib"}
            }
}
 }


On Sun, Jul 3, 2016 at 2:33 AM, Raymond Cheung <korekontakt@gmail.com>
wrote:

> I'm using FreeBSD 11.0-ALPHA5 to test.
>
> If I use clang/clang++ with the official distro, then nn.test() are passed
> but torch.test() are error/failed.
>
> If I use gcc/g++ for pkg/torch and others with clang/clang++ (and run exec
> '/usr/local/bin/lua51' -e  ...), then two tests (max and min) of
> torch.test() are error/failed:
> max
> error in torch.max (value) - NaNs
> BOOL violation condition=false
>
> min
> error in torch.min - NaNs
> BOOL violation condition=false
>
> But I can't require 'nn':
> install/lib/lua/5.1/ffi.so: Undefined symbol "cpow"
>
>
> On Thu, Jun 30, 2016 at 9:19 AM, Raymond Cheung <korekontakt@gmail.com>
> wrote:
>
>> Hi all,
>>
>> I tried the Jan's git ports. However, I got 21 errors out of 127 torch
>> tests. It said FFI can't point to some structures. Also, I can require nn
>> even it was installed via luarocks. It said the tester suite is missing.
>>
>> Are the blas finding codes located at math/TH? Thanks.
>>
>> Raymond
>> On Jun 24, 2016 17:12, "Raymond Cheung" <korekontakt@gmail.com> wrote:
>>
>>> Hi Jan and Torsten,
>>>
>>> Thanks a lot for your help.
>>>
>>> I will try it later after taking a break. As I lack knowledge on C/C++,
>>> I spent a month to retry many ways on FreeBSD 10/11. I feel tried.
>>> Fortunately, I got some clues.
>>>
>>> During this month, I also learnt a lot on FreeBSD. As least I can build
>>> and install new world/kernel from GhostBSD 10.3 to 11 Alpha 4.
>>>
>>> Thanks again for your help.
>>>
>>> Raymond
>>> On Jun 24, 2016 06:41, "Jan Beich" <jbeich@vfemail.net> wrote:
>>>
>>>> Torsten Zuehlsdorff <tz@FreeBSD.org> writes:
>>>>
>>>> > Hello Raymond,
>>>> >
>>>> >> OpenBlas (make config; # with OpenMP option), OpenMP, Lapack & ++,
>>>> GotoBlas
>>>> >> are installed. Header files of OpenBlas is also included to
>>>> >> $CMAKE_LIBRARY_PATH. However, I still got the same error message,
>>>> missing
>>>> >> lapack.
>>>> >
>>>> > There are various variables to set to specify where to look vor the
>>>> > libs, like lapack.
>>>> >
>>>> > Sadly i'm out of time. Tomorrow i'm heading into vacation. When back i
>>>> > will come back to your request and try to create a port for
>>>> > this. Maybe we could success together (with more time).
>>>>
>>>> I did some work in the past on Torch7 ports before losing interest[1].
>>>> Check math/TH if you want to see how it detects OpenBLAS (default).
>>>>
>>>>   $ git clone https://github.com/jbeich/freebsd-ports torch-ports
>>>>   $ export PORTSDIR=$PWD/torch-ports
>>>>   $ cd $PORTSDIR/devel/lua-trepl
>>>>   $ make install
>>>>   $ th51
>>>>
>>>> --
>>>> [1] Many Torch pkgs rely on luarocks to build and resolve dependencies
>>>>     and some have a hard dependency on luajit. My approach didn't scale
>>>>     as writing such ports often required translating *.rockspec files
>>>>     which can quickly grow into maintenance nightmare, so an infra work
>>>>     had to be done beforehand.
>>>>
>>>
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAFGnCTYRBm9Orm-fb5-VdHRinc7nwHJasuJRAQvsHhP213Da3w>