From owner-freebsd-ports@freebsd.org Fri Jul 8 09:13:09 2016 Return-Path: Delivered-To: freebsd-ports@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D7D52B760C3 for ; Fri, 8 Jul 2016 09:13:09 +0000 (UTC) (envelope-from korekontakt@gmail.com) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id B01551794 for ; Fri, 8 Jul 2016 09:13:09 +0000 (UTC) (envelope-from korekontakt@gmail.com) Received: by mailman.ysv.freebsd.org (Postfix) id AF5E5B760C2; Fri, 8 Jul 2016 09:13:09 +0000 (UTC) Delivered-To: ports@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ACA99B760C0 for ; Fri, 8 Jul 2016 09:13:09 +0000 (UTC) (envelope-from korekontakt@gmail.com) Received: from mail-vk0-x243.google.com (mail-vk0-x243.google.com [IPv6:2607:f8b0:400c:c05::243]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 586831792; Fri, 8 Jul 2016 09:13:09 +0000 (UTC) (envelope-from korekontakt@gmail.com) Received: by mail-vk0-x243.google.com with SMTP id d67so7052591vkh.0; Fri, 08 Jul 2016 02:13:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=cPRYxoX7aVwty1XNLE1+jir04v6A0iVRAwn3BHwR0r0=; b=PxrvqoJYar7UCbt94E8ULhJCF9dBXz8pLaYv7DW0rhma8W2MwbHszL3ghxW7GwUKeS anvutT4JoKMrT47UGf7le932zx0k7aI5QhbdpgWtXj3hgoAUD3IxrQFmSY1XQlBdCfR5 Gc71H/fB0j2QAsnRYJ0GO7FhOwgDY9dEsjLLYJN1nl/+UA0ND5yuQBi7qRoPsQgAWiwN bYhdL1v8vk+89oxUjliVuP7Oa3n4ZakwM3VnVwjQQiQjq27E7Q3RaLlKaC9KcjtlBaQ1 YoUN2fQs/VaQF5OcKR/QVzEdXW5SDoUQO0k9kICF5Oz8aWqBM3IsGjYU75X8luPGVNUA 82eg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=cPRYxoX7aVwty1XNLE1+jir04v6A0iVRAwn3BHwR0r0=; b=Lihfx5TZ5MsdT6PT4OMTiF+6ZVFWM6VVCetAt+SMpYGCzn8xAIh+vy9bAHqspewZ9A /1R0QFlm9B+pXNlW4edE8uido5goYduIh5MI+xE7y97gW2MwOA9f4IXBbvcvcFEmNgUE m1Q+xDPXck9Xlfd7EYrugeyvnhoIdjQwiYz6ozz04ilhHDcd4HNwTGpzqucBkw2LbS3D UuQP5++WXXmQNy0+B+ngUh8QS+VpaVjhWXyOcFVKJncSifwDsDh50F0nmRB6BTZJtrxX 19+hf8HVXvVa/Ef7FFUjwjHLQFVDmjk788h18F4LxEcVToTC+B9/KmTTdhnf7fLaL/T6 VaKQ== X-Gm-Message-State: ALyK8tKNrMBnUaugI8zHpwY+LN2GPzyxinMDx+Yg0IRDFFzSys88K2xMjtgf//+mehd5aUBUjuu3BQi77QvUlg== X-Received: by 10.31.62.2 with SMTP id l2mr2230127vka.87.1467969185211; Fri, 08 Jul 2016 02:13:05 -0700 (PDT) MIME-Version: 1.0 Received: by 10.103.41.194 with HTTP; Fri, 8 Jul 2016 02:13:04 -0700 (PDT) In-Reply-To: References: <20160609190710.GT41922@home.opsec.eu> <9f300278-31ab-bc50-1fc7-8e7e6dc44215@toco-domains.de> <8txv-34vw-wny_-_@vfemail.net> From: Raymond Cheung Date: Fri, 8 Jul 2016 17:13:04 +0800 Message-ID: Subject: Re: Torch7 ports (Was: Wxlua / Zbstudio) To: Jan Beich Cc: ports@freebsd.org, Kurt Jaeger , Torsten Zuehlsdorff Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.22 X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Jul 2016 09:13:09 -0000 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 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 > 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" 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" wrote: >>> >>>> Torsten Zuehlsdorff 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. >>>> >>> >