MINDMAKERS Forum
Welcome, Guest. Please login or register.
September 08, 2010, 02:23:19 PM

Login with username, password and session length
Search:     Advanced search
NB: Spam bots are becoming smarter every day - we had to turn off regular registration. To become member, please send email to Kris Thorisson ([kris'_lastname] att ru dott is).
337 Posts in 99 Topics by 99 Members
Latest Member: peterwit
* Home Help Search Login Register
+  MINDMAKERS Forum
|-+  Projects
| |-+  Psyclone (Moderator: cmlabs)
| | |-+  Compilation problems with cygwin.
« previous next »
Pages: [1] 2 Print
Author Topic: Compilation problems with cygwin.  (Read 5287 times)
JB
Newbie
*
Posts: 8


View Profile Email
« on: January 30, 2008, 08:25:59 AM »

Hello,

I'am a new PhD student working on GRETA (Catherine Pelachaud).

We want to compile our code with cygwin. But, when we compile, Gcc didn't found " ifaddrs.h " and "execinfo.h".

Can somebody says me which library we need ?

Thanks.


Logged
thorlist
Jr. Member
**
Posts: 51


thorlist
View Profile WWW Email
« Reply #1 on: January 30, 2008, 09:55:11 PM »

Hi Catherine,

It looks like the WIN32 symbol is not defined which means that the code compiles as on a standard UNIX system. This is surprising as the Makefile specifically defines this symbol when compiling on Cygwin.

Can you tell me the following:

- the full library name and version (incl. the os name)
- when and where did you download it
- the output of the command "uname -a" from the Cygwin prompt
- the output of the command "gcc -v" from the Cygwin prompt

Then I can try to help figuring out what is going wrong.

Best,
Thor
Logged
JB
Newbie
*
Posts: 8


View Profile Email
« Reply #2 on: January 31, 2008, 06:58:58 AM »

Hi,

I'm not Catherine, I'm Jean BERNARD. I'm a Catherine student.

So,

I work with the psyclonesdk1.1.7.pbl.cygwin.tgz version, donwloaded at : http://www.mindmakers.org/projects/Psyclone/pages/Cygwin.html

Thanks for your help Wink

Best,
Jean
« Last Edit: January 31, 2008, 07:00:30 AM by JB » Logged
JB
Newbie
*
Posts: 8


View Profile Email
« Reply #3 on: January 31, 2008, 07:01:51 AM »

A little additionnal question :

Does the system need the glibc library ?

Thanks.
Logged
thorlist
Jr. Member
**
Posts: 51


thorlist
View Profile WWW Email
« Reply #4 on: January 31, 2008, 08:13:55 AM »

Hi Jean,

Thanks for the information, everything does appear to be fine with your Cygwin system.

Yes, it does need the glibc library. Could you try to install this and see if that helps. If not, we can continue the testing...

Best,
Thor
Logged
JB
Newbie
*
Posts: 8


View Profile Email
« Reply #5 on: January 31, 2008, 09:03:01 AM »

Hi,

I can't install glibc on cygwin.

There is a problem on the configuration step.

Has somebody any idea ?

Logged
thorlist
Jr. Member
**
Posts: 51


thorlist
View Profile WWW Email
« Reply #6 on: January 31, 2008, 09:16:20 AM »

Hi Jean,

When I installed Cygwin I just used the installation tool from Cygwin.com and made sure to install the packages for gcc, make, binutils and glib. After this compiling of the Psyclone SDK works out of the box without any further configuration.

I have never needed to manually configuring products the UNIX-way...

Thor
Logged
thorlist
Jr. Member
**
Posts: 51


thorlist
View Profile WWW Email
« Reply #7 on: January 31, 2008, 09:18:05 AM »

I will try to freshly install Cygwin on my computer and test this build. I will get back to you with the results.

Thor
Logged
mauman
Newbie
*
Posts: 13


View Profile Email
« Reply #8 on: February 06, 2008, 11:35:09 AM »

Hi, I'm working with Jean on Greta. Today I searched through Internet and I verified that the glic library is NOT included in CygWin. So it seems impossible to compile a code using that library. Did you try to recompile your version of Psyclone using CygWin, and if you succeded in doing this, can you help us with our problem?
Best regards,
Maurizio
Logged
thorlist
Jr. Member
**
Posts: 51


thorlist
View Profile WWW Email
« Reply #9 on: February 06, 2008, 03:30:31 PM »

I agree, I cannot see a separate glibc package, I expect that comes with GCC.

Did you make sure that you installed these Cygwin packages:

binutils (>=200608)
gcc
gcc-g++
make (>=3.81)

If this is the case, could you then (as a test) download the CoreLibrary source code (Open Source) from this link:

   http://www.cmlabs.com/psyclone/download/nc/1.1.7.NC/CoreLibrary1.1.7.lgpl.tgz

and try to compile this on your computer (unpack, cd into CoreLibrary, do 'make'). If this fails, could you copy all the text that it outputs so I can see where it goes wrong?

Best,
Thor
Logged
JB
Newbie
*
Posts: 8


View Profile Email
« Reply #10 on: February 19, 2008, 03:09:29 PM »

Hi,

Sorry for the long time passed, I was searching what was wrong.

So when I use your Makefile it's right : the compilation is running, the build is completed.

But when I use Eclipse C++, it doesn't work.

In fact there is a probleme with the global definition of Win_32 and CYGWIN.

...

I will try again.

Best,

Logged
thorlist
Jr. Member
**
Posts: 51


thorlist
View Profile WWW Email
« Reply #11 on: February 19, 2008, 03:34:50 PM »

Thanks for your feedback.

I would be very interested in including an Eclipse project file with our libraries. The Makefile should tell you exactly which defines are needed - alternatively you can remove the @ in front of the g++ compile and linker lines in the Makefile - then you can see on the command line output of Cygwin Make exactly which defines are being used.

Let me know what I can do to help.

Best,
Thor
Logged
JB
Newbie
*
Posts: 8


View Profile Email
« Reply #12 on: February 19, 2008, 07:15:28 PM »

Hi,

I'm working on ! ;-)

So

According to the make file, I have configured the Eclipse project to have this GCC command line :
-O2 -D_GNU_SOURCE -D_REENTRANT -D_THREAD_SAFE -D WIN32 -D CYGWIN -D_WIN32_WINNT=0x0500

The first problems comme from the compilation of the "dlfcn_darwin.c".

The system doesn't find this header :
#include <mach-o/dyld.h>
#include <mach-o/nlist.h>

A little search on Google let me think this is OS X Compatibility system.
So I try to delete this file (dlfcn_darwin.c).


The second problem is the location of the header (in the include folder) so I have add this include path in the project setting.

The third problem is in the file "wce_time.cpp", the system didn't found the tchar.h file. A short search, locate this file in the mingw directory (/usr/include/mingw). After including this path in the project setting, the file was found.

The fourth problem is in the file "wce_time.cpp", the system don't recognize the sprintf function.

I'm working on the Fourth problem...

 Grin
Logged
JB
Newbie
*
Posts: 8


View Profile Email
« Reply #13 on: February 19, 2008, 07:36:13 PM »

Yeah it's me ^^

Sorry ... the code make me mad !  Shocked Shocked

So

I've passed the fourth and fifth problems by adding
#include <stdio.h>
And uncomment :
#include <sys/types.h>
in the "wce_time.h" file.

But I think this is not a good solution.(I didn't find another solution for the moment)

The 6th problem is here ("wce_time.cpp") :

struct timeb Filetime2timeb(FILETIME * ptr)
{
   ...
   __int64 x = ((__int64) ptr->dwHighDateTime << 32) + ((unsigned) ptr->dwLowDateTime);
   x -= _FACTOR;         /* number of 100ns between 1601 and 1970 */

The system said the constant is too large for long type.

Any idea ?

Thanks


Logged
thorlist
Jr. Member
**
Posts: 51


thorlist
View Profile WWW Email
« Reply #14 on: February 19, 2008, 08:44:14 PM »

OK, do stop editing the code as there is no need.

There are some files that should not be included into the project as they are OS specific and included automatically if needed. You should only include the files that are listed in the Makefile and not wce_time.cpp and dlfcn_darwin.c.

Best,
Thor
Logged
Pages: [1] 2 Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.4 | SMF © 2006-2007, Simple Machines LLC Valid XHTML 1.0! Valid CSS!