Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compile the srwlpy.so on ubuntu 14.04 #5

Open
tyjisinap opened this issue Jan 13, 2016 · 4 comments
Open

compile the srwlpy.so on ubuntu 14.04 #5

tyjisinap opened this issue Jan 13, 2016 · 4 comments

Comments

@tyjisinap
Copy link

I compile the srwlpy.so on ubuntu 14.04, the python is anaconda python 2.7.11. and when I run the example 06 07 08 09 ..., it is crashed with segmentation fault. I don't know why. Thank you!

@ochubar
Copy link
Owner

ochubar commented Jan 13, 2016

Perhaps you linked it with a wrong version of FFTW library(?). It should be fftw-2.1.5 compiled for 32 bit (i.e. with the option --enable-float, see README.txt).

Sent from my T-Mobile 4G LTE Device

-------- Original message --------
From: tyjisinap notifications@github.com
Date: 01/12/2016 7:56 PM (GMT-05:00)
To: ochubar/SRW SRW@noreply.github.com
Subject: [SRW] compile the srwlpy.so on ubuntu 14.04 (#5)

I compile the srwlpyso on ubuntu 1404, the python is anaconda python 2711 and when I run the example 06 07 08 09 , it is crashed with segmentation fault I don't know why


Reply to this email directly or view it on GitHubhttps://github.com//issues/5.

@tyjisinap
Copy link
Author

I compiled the FFTW as the follow, and my os is x86_64 , you mean I need to complied for 32bit? Thank you!

cd fftw-2.1.5
./configure --enable-float --with-pic
Manually (using editor) add -fPIC option to CFLAGS in Makefile
make
make install
cp fftw/.libs/libfftw.a SRW_Dev/ext_lib/

@ochubar
Copy link
Owner

ochubar commented Jan 13, 2016

Sorry I was not precise. The library itself (libfftw.a) should be compiled for 64 bit, but it should be configured to work with single-precision numbers. This is ensured by the --enable-float switch. It looks like you did compile it correctly. However, maybe at linking, another, default library of Ubuntu is used? It may have same name (libfftw.a) yet it may be compiled to operate with double-precision numbers (which is the default case).

Sent from my T-Mobile 4G LTE Device

-------- Original message --------
From: tyjisinap notifications@github.com
Date: 01/12/2016 9:41 PM (GMT-05:00)
To: ochubar/SRW SRW@noreply.github.com
Cc: "Tchoubar, Oleg" chubar@bnl.gov
Subject: Re: [SRW] compile the srwlpy.so on ubuntu 14.04 (#5)

I compiled the FFTW as the follow, and my os is x86_64 , you mean I need to complied for 32bit? Thank you!

cd fftw-2.1.5
./configure --enable-float --with-pic
Manually (using editor) add -fPIC option to CFLAGS in Makefile
make
make install
cp fftw/.libs/libfftw.a SRW_Dev/ext_lib/


Reply to this email directly or view it on GitHubhttps://github.com//issues/5#issuecomment-171139864.

@tyjisinap
Copy link
Author

Thank you very much! I replaced all the libfftw.a and removed all the libfftw.so, it works!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants