DLListing 发表于 2015-8-29 15:38

在Mac中使用Homebrew安装Siril教程

在Mac中使用Homebrew安装Siril教程
此教程只针对于Mac OS系统,在Linux(Ubuntu等,安装更为简单,只要根据网站的步骤就可安装成功。)

Siril的网站地址:http://free-astro.vinvin.tf/index.php/Siril


以下是基于Mac OS 10.10.5的安装过程,以下的安装过程都是在“终端”中完成的。

0. Mac系统首先需要安装command lines,苹果网站下载,不赘述了。

1. 下载Siril:

svn co https://free-astro.vinvin.tf/svn/siril/

2. 安装homebrew,其网址为:http://brew.sh,有简体中文。

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

homebrew的一些简单命令:
brew install XXXX, 安装XXXX
brew list, 查看已经安装的程序
brew search XXXX, 查找XXXX
brew update, 更新home-brew

更多的请 man brew

3. 开始安装Siril所需要的一大堆包,由于Mac下没有GTK,而Siril的工作界面是基于GTK的,所以需要这些一大堆包来支持。其中GTK安装成功是关键。


brew install automake
brew install autoconf
brew install gtk+3
brew install gnome-icon-theme
brew install librsvg
brew install cfitsio
brew install fftw
brew install gsl
brew install libconfig
brew install libraw
brew install tiff
brew install libpng
brew tap homebrew/science, 然后,brew install opencv


注意:在安装libtiff和libpng可能会遇到一些问题,主要是因为安装的libtiff和libpng和系统里自带的“/System/Library/Frameworks/ImageIO.framework/Versions/A/Resources”下的libtiff和libpng冲突,此时需要把/usr/local/liblibtiff.dylib连接到/System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libTIFF.dylib,具体做法为:
cd /usr/local/lib
ln -sf /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libTIFF.dylib libtiff.dylib

4. 所有准备工作完成,安装Siril

cd ~/siril/
autoreconf -fi
./configure
make
sudo make install
若成功,它会安装到/usr/local/bin下,在终端swirl就开始快乐的sirilzhi'l之旅吧。

注意:安装过程中若遇到int64_t冲突的问题,请将之中之一改为如下:
#define int64 int64_hack
#define uint64 uint64_hack

此教程在ecloud的协助下完成。


Latton 发表于 2015-8-29 21:52

谢谢指教

蝶梦 发表于 2015-9-2 04:39

我用了一个晚上,把Windows版编译出来了。

蝶梦 发表于 2015-9-2 05:07

不对,我编译出来的是一个很古老的版本,不是最新版。

DLListing 发表于 2015-9-2 14:26

蝶梦 发表于 2015-9-2 04:39
我用了一个晚上,把Windows版编译出来了。

写个Windows版本的教程吧,很多用户会用Windows吧。

LEEFF 发表于 2015-9-3 01:24

更正:1、那两句应该改为:typedefine int64_t int64_hack
                         typedefine uint64_t uint64_hack
               即句尾加"_hack"
          2、安装好后在终端输入:siril 即可运行
我刚在ecloud指导下装完。谢谢ecloud!谢谢楼主!

蝶梦 发表于 2015-9-3 23:23

DLListing 发表于 2015-9-2 14:26
写个Windows版本的教程吧,很多用户会用Windows吧。

今天在Windows下编译成功了,可以正常运行。
不过在Windows下编译非常麻烦,不仅要编译一大堆库,还要对其本身代码作不少修改。

DLListing 发表于 2015-9-4 06:56

蝶梦 发表于 2015-9-3 23:23
今天在Windows下编译成功了,可以正常运行。
不过在Windows下编译非常麻烦,不仅要编译一大堆库,还要对 ...

做一个无需安装的绿色版本可能也是不错的选择。

Liquid.cn 发表于 2015-11-20 04:52

虽然很麻烦,但是毕竟使得常用的叠加软件真正跨平台而且跟上64位时代了。

Liquid.cn 发表于 2015-11-20 07:26

本帖最后由 Liquid.cn 于 2015-11-20 07:44 编辑

我按照上面的步骤指示编译完成了,也算能够运行到程序界面,但是我在程序启动日志里发现一条
log: Parallel processing disabled: Using 1 logical processor.我机器的CPU是双核的,另外也有四核的windows机器在用,所以觉得不能使用多核很奇怪。
详细的启动记录是这样的:radio-mac:trunk radio$ siril

(siril:29987): Pango-WARNING **: couldn't load font ".Lucida Grande UI Italic Semi-Condensed Not-Rotated 12", modified variant/weight/stretch as fallback, expect ugly output.
successfully loaded /usr/local/share/siril/

(siril:29987): Gtk-WARNING **: Could not find signal handler 'on_cellrenderertext11_toggled'.Did you compile with -rdynamic?
log: Welcome to siril v0.9.1 alpha
log: Supported file types: BMP images, PIC images (IRIS), PGM and PPM binary images, RAW images, FITS-CFA images, TIFF images, JPG images, PNG images.
log: Loading init file: /Users/radio/.siril/siril.cfg
log: Setting CWD (Current Working Directory) to `/Users/radio/siril/trunk'
log: Added a registration method: Image pattern alignment (planetary/deep-sky)
log: Added a registration method: One star registration (deep-sky)
log: Added a registration method: Global star alignement (deep-sky)
log: Parallel processing disabled: Using 1 logical processor.
我在项目官网上面的视频介绍里看到别的机器运行都能正常打开多核支持,比如官方Manual里的视频(http://free-astro.vinvin.tf/index.php/Siril:Manual),显示
log: Parallel processing enabled: Using 8 logical processors.
我还没用siril开始叠图等操作,但是估计只能用单核肯定会慢。不知道这种情况是不是由于编译过程哪一步出问题才导致的呢?还是可以在别的配置文件里面启用多核支持。
还望有经验的楼主解答。

Liquid.cn 发表于 2015-11-20 07:39

本帖最后由 Liquid.cn 于 2015-11-20 07:41 编辑

编译过程中曾出现过两个warning,不知是否有影响:
In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/limits:112:
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/__undef_min_max:16:2: warning: : macro min is incompatible with C++. #undefing min [-W#warnings]
#warning: macro min is incompatible with C++.#undefing min

/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/__undef_min_max:26:2: warning: : macro max is incompatible with C++. #undefing max [-W#warnings]
#warning: macro max is incompatible with C++.#undefing max

2 warnings generated

ecloud 发表于 2015-11-21 16:33

Liquid.cn 发表于 2015-11-20 07:26
我按照上面的步骤指示编译完成了,也算能够运行到程序界面,但是我在程序启动日志里发现一条
我机器的CPU是 ...

一样,我也是只能单路
主要是openMP在llvm-clang上没有很好的支持,而很多库是基于openMP的所以也就只能单路跑了
我不是很介意性能所以没太花心思研究这个问题,或许可以有什么办法让openMP生效,不过似乎所有的库都要重新编译,比较麻烦

ecloud 发表于 2015-11-21 16:36

另外,Alpha版尽量别用,除非你自愿当小白鼠想替开发抓虫
干活的话还是0.9.0稳定版的好

Liquid.cn 发表于 2015-11-21 17:49

ecloud 发表于 2015-11-21 16:33
一样,我也是只能单路
主要是openMP在llvm-clang上没有很好的支持,而很多库是基于openMP的所以也就只能 ...

我的mac用的还是6年前的Core 2 Duo,难道llvm上对不同代的CPU支持程度还不一样?
所以我才觉得奇怪

Liquid.cn 发表于 2015-11-25 06:51

ecloud 发表于 2015-11-21 16:33
一样,我也是只能单路
主要是openMP在llvm-clang上没有很好的支持,而很多库是基于openMP的所以也就只能 ...

折腾了两天,最终还是找到了解决办法:苹果默认的llvm/clang没有OpenMP支持,gcc 4.9及以上又出现了multilib版本不能编译OpenMP代码的bug
最后怒了,装上gcc 4.8,编译的时候看信息正常启用了 -fopenmp参数,编译正常通过,目前可以支持双核了
启动siril的时候显示:
log: Parallel processing enabled: Using 2 logical processors.

Liquid.cn 发表于 2015-11-25 16:11

本帖最后由 Liquid.cn 于 2016-2-22 21:54 编辑

ecloud 发表于 2015-11-21 16:33
一样,我也是只能单路
主要是openMP在llvm-clang上没有很好的支持,而很多库是基于openMP的所以也就只能 ...
顺说,如果用gcc 4.9以上的版本编译siril,貌似必须用multilib;但gcc 4.9及以上带multilib的版本对OpenMP的支持有bug,编译不了OpenMP代码
不带multilib的版本能编译OpenMP代码了,但是64位平台上又提示寄存器类型不对,似乎是有32位的代码在里面。
也就是用gcc 4.9及以上版本的时候,siril的多核支持和正常运行两者不可兼得。

最后回到gcc 4.8版本,multilib和OpenMP才都正常了。

页: [1]
查看完整版本: 在Mac中使用Homebrew安装Siril教程