Install Optolithium in ubuntu 16.04

First, enter directory OptolithiumC which in <OPTOLITHIUM_SRC>

cd <OPTOLITHIUM_SRC>/OptolithiumC

We need cmake to install this open source software, so cmake should be installed if not exist.

sudo apt install cmake

The following we continue installing by cmake

sudo cmake CMakeLists.txt

Here I encounter an error:

CMake Error at /usr/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:148 (message):
Could NOT find SWIG (missing: SWIG_EXECUTABLE SWIG_DIR)

It seems that we need library swig, so we install this library first:

sudo apt install swig

Let’s continue. Another error occur:

Could NOT find PythonLibs (missing: PYTHON_LIBRARIES PYTHON_INCLUDE_DIRS)
(Required is at least version “2.7”)

I solve this problem by append python directory in cmake command(indicates the location of the system python):

sudo cmake CMakeLists.txt -DPYTHON_INCLUDE_DIR=/usr/include/python2.7 -DPYTHON_LIBRARY=/usr/lib/python2.7/config/libpython2.7.so

One more error:

CMake Error at FindNumPy.cmake:62 (message):
NumPy import failure:
Traceback (most recent call last):
File “<string>”, line 1, in <module>
ImportError: No module named numpy

This error was solved by installing numpy:

pip install numpy

Encounter error:

CMake Error at /usr/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:148 (message):
Could NOT find FFTW (missing: FFTW_LIBRARIES FFTW_INCLUDES)

solved by install fftw:

sudo apt install libfftw3-dev

And cmake finish successfully.

The following we make install:

make install

encounter error:

/usr/bin/ld: libs/clipper/libpolyclipping.a(clipper.cpp.o): relocation R_X86_64_32 against `.rodata.str1.1’ can not be used when making a shared object; recompile with -fPIC

solve by addfPIC flag in file CMakeList.txt
CMakeList.txt line 31:

SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -include cmath -std=gnu++11 -Wall")

change to

SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -include cmath -std=gnu++11 -Wall")

add new line:

SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")

make succeed!

One more last thing: install required python library for GUI:

cd <OPTOLITHIUM_SRC>/OptolithiumGUI
sudo apt install qt-sdk
pip install scipy==0.15.1 psutil==2.2.1 pyside==1.2.1 matplotlib==1.4.0 filemagic==1.6 bson==0.3.3 sqlalchemy==0.9.4 python-gdsii==0.2.1

We type this command in directoryOptolithiumGUI

python main.py

You can see the UI window now!

  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值