From owner-freebsd-users-jp@freebsd.org Mon Jun 11 05:41:39 2018 Return-Path: Delivered-To: freebsd-users-jp@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 169C91009F94 for ; Mon, 11 Jun 2018 05:41:39 +0000 (UTC) (envelope-from kh@mogami.com) Received: from mail.mogami.com (mail.mogami.com [122.103.163.237]) by mx1.freebsd.org (Postfix) with ESMTP id 7D1296EB5D for ; Mon, 11 Jun 2018 05:41:38 +0000 (UTC) (envelope-from kh@mogami.com) Received: from ana (ana [192.168.2.130]) by mail.mogami.com (Postfix) with SMTP id C964F18CC4B for ; Mon, 11 Jun 2018 14:41:28 +0900 (JST) Date: Mon, 11 Jun 2018 14:40:18 +0900 From: Kouichi Hirabayashi To: freebsd-users-jp@freebsd.org Message-Id: <20180611144018.f90de42d7d9a3713f86b8e4e@mogami.com> Organization: MIT Inc. X-Mailer: Sylpheed 3.3.0 (GTK+ 2.24.17; i386-portbld-freebsd8.4) Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-2022-JP Content-Transfer-Encoding: 7bit Subject: [FreeBSD-users-jp 96219] =?iso-2022-jp?b?RnJlZUZlbSsrIBskQiROJSQlcyU5JUghPCVrTGRCahsoQg==?= X-BeenThere: freebsd-users-jp@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: Discussion relevant to FreeBSD communities in Japan List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jun 2018 05:41:39 -0000 FreeFem++ (http://www.freefem.org/) freefem++-3.60.tar.gz の描画プログラム ffglut を動かす方法を見つけた方はおられないでしょうか? 例えば、FreeBSD-10.3, FreeBSD-11.1 などで、 $ ./configure --enable-download --without-mpi で compile できる(注1)のですが、描画プログラム ffglut が動きません。 $ ./ffglut /usr/local/lib/compat/libstdc++.so.6: version GLIBCXX_3.4.11 required by .. とか /lib/libgcc_s.so.1: version GCC_4.6.0 required by /usr/local/lib/gcc48.. ライブラリの矛盾で起動せず、無理に LD_LIBRARY_PATH=/usr/local/lib/gcc48 ffglut と起動しても『セグメンテーション違反 (core dumped)』で使えません。(注2) どなたか、問題を解決していただけると嬉しいです。 注1 - compile 法 FreeBSD-10.3 で行った方法を書いておきます。 ports/graphics/freeglut がインストールされていて、wget, perl, bash が存在することを確認してから、実行してください。 1) compile 中で使われるコマンドの準備 Linux 前提の script になっていますので、例えば、 ln -s /usr/local/bin/wget /usr/bin/wget ln -s /usr/local/bin/perl /usr/bin/perl ln -s /usr/local/bin/bash /bin/bash mv /usr/bin/make /usr/bin/make.bsd ln -s /usr/local/bin/gmake /usr/bin/make すべての仕事が終った後で /usr/bin/make を元に戻します。 rm /usr/bin/make mv /usr/bin/make.bsd /usr/bin/make あるいは ln -s /usr/bin/make.bsd /usr/bin/make 2) FreeBSD で必要な変更 *** src/fflib/AFunction.cpp.orig 2018-04-13 18:14:48.000000000 +0900 --- src/fflib/AFunction.cpp 2018-06-10 20:00:03.967376000 +0900 *************** *** 35,41 **** // put here some def dur to c++11 // problem with mixed with using namespace std; // to correct bug in g++ v 4.8.1 add std ! #if defined (_WIN32 ) || (__GNUC__ >=5) #define NM_STD std:: #else #define NM_STD --- 35,41 ---- // put here some def dur to c++11 // problem with mixed with using namespace std; // to correct bug in g++ v 4.8.1 add std ! #if defined (_WIN32 ) || (__GNUC__ >=4) #define NM_STD std:: #else #define NM_STD *************** *** 67,72 **** --- 67,73 ---- #include "array_init.hpp" // Add FH to get memroy used in test .. march 2014 + #include #if __APPLE__ #include #elif HAVE_MALLOC_H *** src/femlib/CheckPtr.cpp.orig 2018-04-13 18:14:48.000000000 +0900 --- src/femlib/CheckPtr.cpp 2018-06-10 20:07:06.831087000 +0900 *************** *** 25,35 **** --- 25,39 ---- void* operator new (std::size_t size, const std::nothrow_t& nothrow_value) noexcept; p */ + #if __FreeBSD__ + #include + #else #if __APPLE__ #include #else #include #endif + #endif static long verbosity; 3) compile ./configure --enable-download --without-mpi make これで src/nw/FreeFem++, FreeFem++-nw, ffglut ができます。 ./configure --enable-download --without-mpi --enable-debug だと、デバッグ用のバイナリができます。 --without-mpi を指定しなければ MPI を使う FreeFem++-mpi もできます。 注2 - グラフィック表示なしの FreeFEM-nw は正常に動作します。 平林 浩一