豆粑粑 ubuntu 18.04 install "snap-higher-order"
本帖最后由 meatball1982 于 2019-4-7 09:13 编辑install "snap-higher-order" on ubuntu 18.04
https://www.twblogs.net/a/5b8b1af32b717718832d534d
make all
then
nvalid use of incomplete type ‘struct __exception’
add the following to
snap-higher-order/glib-core/bd.cpp
there is still lots of warning, but it works.
according to :
https://github.com/snap-stanford/snap/issues/146and
https://github.com/rkrohn/redditmodel/commit/d1cedbc3471fc2901d4239b30317d0b458b2ae99
12 #elif defined(GLib_GLIBC) || defined(GLib_BSD)
13 struct __exception {
14 int type; /* Exception type */
15 char*name; /* Name of function causing exception */
16 double arg1; /* 1st argument to function */
17 double arg2; /* 2nd argument to function */
18 double retval; /* Function return value */
19 };
20
21 int _matherr(struct __exception* e){
本帖最后由 meatball1982 于 2019-4-8 09:51 编辑
make arpack
modify the ARmake.inc
https://www.linuxquestions.org/q ... n-libraries-440794/
MAKE=/usr/bin/make
FFLAGS = -O
我的ARmake.inc放上来了。自己参考修改。
别,生成的libarpack_linux.a
sudo cp libarpack_linux.a /usr/lib
本帖最后由 meatball1982 于 2019-4-8 09:48 编辑
真是一个大坑,
在虚拟机上。
g++ -std=c++98 -Wall -O3 -DNDEBUG -fopenmp -DF77_POST -o motifclustermain motifclustermain.cpp ../../snap-adv/motifcluster.cpp ../../snap-core/Snap.o -I../../snap-core -I../../snap-adv -I../../glib-core -I../../snap-exp-larpack -lrt /usr/lib/gcc/x86_64-linux-gnu/4.8/libgfortran.a加了最后这一句。
/usr/lib/gcc/x86_64-linux-gnu/4.8/libgfortran.a
否则会一堆gfortran不认谁谁谁谁谁谁谁的错。
“undefined reference to '_gfortran_st_write'
在自己的机器上。
g++ -std=c++98 -Wall -O3 -DNDEBUG -fopenmp -DF77_POST -o motifclustermain motifclustermain.cpp ../../snap-adv/motifcluster.cpp ../../snap-core/Snap.o -I../../snap-core -I../../snap-adv -I../../glib-core -I../../snap-exp-larpack -lrt /usr/lib/gcc/x86_64-linux-gnu/4.8.5/libgfortran.so最后加的是
/usr/lib/gcc/x86_64-linux-gnu/4.8.5/libgfortran.so
否则会出现。
can not be used when making a PIE object; recompile with -fPIC
一类的错误。
应该是两个机器的gcc不太一样的原因。.so .a的区别,我暂时不知道。可能还得看看c++的书。应该一个动态的,一个是静态的,根据自己的机器,尝试一下。
另外,ARpack里的UTIL下的second.f
* .. External Functions ..
REAL ETIME
<font color="#ff0000">* EXTERNAL ETIME</font>
* ..
* .. Executable Statements ..
*
<font color="#ff0000">* T1 = ETIME( TARRAY )</font>
T= TARRAY( 1 )
RETURN
我也给注释了一下。根说,这个函数总出错,大体看了一下,应该是个计时用的。对程序的结果影响不大。
home 的x220是
g++ -std=c++98 -Wall -O3 -DND
EBUG -fopenmp -DF77_POST -o motifclustermain motifclustermain.cpp ../../snap-adv/motifcluster.cpp ../../snap-core/Snap.o -I../../snap-core -I../../snap-adv -I../../glib-core -I../../snap-exp-larpack -lrt /usr/lib/gcc/x86_64-linux-gnu/5.4.0/libgfortran.so meatball1982 发表于 2019-4-7 09:12
make arpack
modify the ARmake.inc
sudo cp /usr/lib/libarpack_linux.a /usr/lib/libarpack.a
页:
[1]