Welcome to the forums. Please post in English or French.

You are not logged in.

#1 2019-06-28 03:30:57

AliF
Member
Registered: 2019-06-28
Posts: 8

Problems with installing code_aster using cygwin

Hello, my English is not very good, please understand.

I use cygwin to install code_aster on windows, using the python command
python setup.py --prefix=/home/Administrator/dev/codeaster_install

There was a problem during execution


Checking for max command length...   32768
Checking for file... /usr/bin/file
Checking for ar... /usr/bin/ar
Checking for architecture... CYGWIN_NT-6.1-7601 / posix / x86_64
Checking for number of processors (core)... 4
Checking for Code_Aster platform type... LINUX64
Checking for bash... /usr/bin/bash
Checking for Python version... 2.7.16
Checking for gcc... /usr/bin/gcc
Checking for /usr/bin/gcc configured installation directory... /usr/lib/gcc/x86_64-pc-cygwin/7.4.0, /usr/bin
Checking for libpthread.lib... no
Checking for libpthread.lib... no
Checking for libz.lib... no
Checking for libz.lib... no
Checking for libdl.lib... no
Checking for libdl.lib... no

Exception raised. See 'setup.log' file for details.

Why is a .lib file instead of a .so file? Ask me where is the problem? Thank you very much

Offline

#2 2019-06-28 03:49:01

AliF
Member
Registered: 2019-06-28
Posts: 8

Re: Problems with installing code_aster using cygwin

The error log file is in the attachment, please help me to see, thank you


Attachments:
setup.log, Size: 2.5 KiB, Downloads: 478

Offline

#3 2019-06-28 13:36:47

jeanpierreaubry
Guru
From: nantes (france)
Registered: 2009-03-12
Posts: 4,049

Re: Problems with installing code_aster using cygwin

hello

the corresponding line for a successful installation on opensuse are like this

Checking for libpthread.so... /usr/lib64/libpthread.so
Checking for libz.so... /usr/lib64/libz.so
Checking for libdl.so... /usr/lib64/libdl.so

this means that the named libraries are not installed
i expect you are going to have a lot more like this
as having these basic libraries not installed is most uncommon to my opinion

which distribution is installed?

jean pierre aubry


consider reading my book
freely available here https://framabook.org/beginning-with-code_aster/

Offline

#4 2019-07-04 09:21:38

AliF
Member
Registered: 2019-06-28
Posts: 8

Re: Problems with installing code_aster using cygwin

jeanpierreaubry wrote:

hello

the corresponding line for a successful installation on opensuse are like this

Checking for libpthread.so... /usr/lib64/libpthread.so
Checking for libz.so... /usr/lib64/libz.so
Checking for libdl.so... /usr/lib64/libdl.so

this means that the named libraries are not installed
i expect you are going to have a lot more like this
as having these basic libraries not installed is most uncommon to my opinion

which distribution is installed?

jean pierre aubry

I am sorry to see it now.

I tried adding a log in setup.py and found this in as_setup.py:


if sys.platform in ("win32", "cygwin"):
          self._ext_static = self._ext_shared  = '.lib' 

I think this is why it is a lib instead of a so file.
I changed this statement to:

if sys.platform in ("win32", "cygwin"):
          self._ext_static = self._ext_shared  = '.so' 

but it still report same error,it can't find libpthread.so .

I found only one libpthread.a in cygwin.
So, I changed the statement to '.a',but it still didn't work.

Then I added the log and found that the environment variable might be wrong. I changed the environment variable, but it still didn't work.
Have you compiled under cygwin? I don't know if anyone has successfully compiled with cygwin, which has been bothering me for a long time.

Thanks to all those who answered my question.My English is not very good, please forgive me.

Offline

#5 2019-07-16 03:35:08

AliF
Member
Registered: 2019-06-28
Posts: 8

Re: Problems with installing code_aster using cygwin

Hello everyone, I am using cygwin to install, the previous problem I solved by modifying check_compilers.py and as_setup.py,

in check_compiiles.py and as_setup.py:
I changes 

if sys.platform in ("win32", "cygwin"):
          self._ext_static = self._ext_shared = '.lib'

to

if sys.platform in ("win32", "cygwin"):
          self._ext_static = self._ext_shared = '.a'

and in as_setup.py, I changes

chk = self.check_type(self._last_found, typ=typ)

to

chk=True

Now, the installation program began to compile the various libraries in the SRC folder, now there are new problems, the new problem is another In a topic

Offline

#6 2021-01-16 08:33:44

xupeiwust
Member
Registered: 2020-02-21
Posts: 20

Re: Problems with installing code_aster using cygwin

Has it been compiled recently? I am studying this work recently.

Offline

#7 2021-04-30 08:02:40

Nick
Member
Registered: 2021-04-30
Posts: 4

Re: Problems with installing code_aster using cygwin

Hello everyone!

I also tried to compile Code_Aster source with Waf on Windows using Cygwin, and get missing libraries errors.
As I understand, you had to have exact versions of all prerequisites installed, so you can compile it. Especially if we talking about correct Python distribution: all Python libraries required are supposed to match with Code_Aster distribution.
I suggest to compile it on Linux first, to see which Python libraries are required, and then repeat it on Windows.
For now I switched to Linux distribution, but I'm planning to go back to Windows platform. If I'll manage to compile it correctly - I'll try to write more specific answer to this question.

Thank You, Nick.

Offline

#8 2021-06-01 13:49:56

xupeiwust
Member
Registered: 2020-02-21
Posts: 20

Re: Problems with installing code_aster using cygwin

Hi NICK

I am very happy for your work. I also tried to compile codeaster with cygwin, but some dependent libraries such as med failed to compile. I look forward to your work and hope to discuss it with you.
In fact, I compiled the serial and parallel versions of codeaster on wsl2 very successfully, but I encountered a lot of difficulties on cygwin

Offline

#9 2021-06-16 20:52:07

Nick
Member
Registered: 2021-04-30
Posts: 4

Re: Problems with installing code_aster using cygwin

xupeiwust wrote:

Hi NICK

I am very happy for your work. I also tried to compile codeaster with cygwin, but some dependent libraries such as med failed to compile. I look forward to your work and hope to discuss it with you.
In fact, I compiled the serial and parallel versions of codeaster on wsl2 very successfully, but I encountered a lot of difficulties on cygwin

Hello,

I asked Maximilien Siavelis about building Code_aster on Windows, so here is the answer:
"I'm using mingw on Linux to build the windows binaries, but it may be possible with Cygwin. In any case you must build prerequisites before (openblas, hdf5, med, etc.)"
So I suggest you to follow his advise. When I'll do it personally (not sure, when it'll happen, exactly) - I'll try to write more specific answer.

Thank you, Nick.

Offline

#10 2021-06-23 11:49:40

xupeiwust
Member
Registered: 2020-02-21
Posts: 20

Re: Problems with installing code_aster using cygwin

Thank you for your answer, I am making further attempts, if I make any progress, I will share my process

Offline