Ecere SDK/eC Forums
http://ecere.org/community/
Print view

Linux - Install Ecere in Fedora 12
http://ecere.org/community/viewtopic.php?f=2&t=90
Page 2 of 3
Author:  arturus [ Fri Aug 20, 2010 12:15 pm ]
Post subject:  Re: Linux - Install Ecere in Fedora 12

Hello Jerome,
jerome wrote:Arturus,

Those .c files are supposed to created by the ecc compiler.
ecc compiler seems to be in your PATH so that's OK...

Code: Select all

[arturus@localhost ~]$ echo $PATH
/usr/lib/qt-3.3/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/lib/ccache:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/arturus/bin
[arturus@localhost ~]$ 
Here it looks like make isn't invoking that ecc compiling step.
Can you do 'make -v' to see what version of make that is?
Here it is:

Code: Select all

[arturus@localhost clock]$ make -v
GNU Make 3.81
Copyright (C) 2006  Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

This program built for i386-redhat-linux-gnu
[arturus@localhost clock]$ 

Then you could try:

make -f clock-Debug.Makefile debug/clock.c

To force executing that rule to build clock.c ..
Was it forced?...

Code: Select all

[arturus@localhost clock]$ make -f clock-Debug.Makefile debug/clock.c
make: `debug/clock.c' is up to date.
[arturus@localhost clock]$
Even before it invokes ecc, it should do the pre-compiling step which should invoke ecp...
Is that debug/ directory there, and does it contain any files? It should have a clock.sym if ecp was executed properly...
There is no /debug directory or clock.sym file.
Also you could try:

make -f clock-Debug.Makefile clean -- see if that does anything, it should get rid of any file and start the build from scratch...

Code: Select all

[arturus@localhost clock]$ dir
clock-Debug.Makefile  clock.ec	clock.epj  clock.ews  LICENSE
[arturus@localhost clock]$ make -f clock-Debug.Makefile clean
make: `clean' is up to date.
[arturus@localhost clock]$ 
make -f clock-Debug.Makefile -n

Which should list all of the commands make will execute.

It should look something like this:

Code: Select all

mkdir debug
ecp   -fmessage-length=0 -m32   -Wall -g -D_DEBUG -c clock.ec -o debug/clock.sym
ecc   -fmessage-length=0 -m32   -Wall -g -D_DEBUG -c clock.ec -o debug/clock.c -symbols debug/
gcc -fmessage-length=0 -m32   -Wall -g -D_DEBUG -c debug/clock.c -o debug/clock.o
ecs  debug\clock.sym debug\clock.imp -symbols debug -o debug/clock.main.ec
ecp   -fmessage-length=0 -m32   -Wall -g -D_DEBUG -c debug/clock.main.ec -o debug/clock.main.sym -symbols debug/
ecc   -fmessage-length=0 -m32   -Wall -g -D_DEBUG -c debug/clock.main.ec -o debug/clock.main.c -symbols debug/
gcc -fmessage-length=0 -m32   -Wall -g -D_DEBUG -c debug/clock.main.c -o debug/clock.main.o
gcc -m32 debug/clock.o debug/clock.main.o -lecere -o debug/clock
This did not happen. Got this:

Code: Select all

[arturus@localhost clock]$ make -f clock-Debug.Makefile -n
gcc -fmessage-length=0 -m32   -Wall -g -D_DEBUG   -c -o debug/clock.o debug/clock.c
Just some things to try to get a clearer picture of what's going on... It's all very odd.

Also for the button graphics missing, that's quite strange also. The building process should have added them to the ecere runtime library, with ear. You could try deleting sdk/ecere/release/libecere.so*
That path does not exist. A search for libecere.so gave this:

Code: Select all

[arturus@localhost clock]$ sudo locate libecere.so
[sudo] password for arturus: 
/home/arturus/Download/ecere/ecere/obj/libecere.so.0.44
/home/arturus/Download/ecere/lib/libecere.so
/home/arturus/Download/ecere/lib/libecere.so.0
/home/arturus/Download/ecere/lib/libecere.so.0.44
/usr/lib/libecere.so
/usr/lib/libecere.so.0
/usr/lib/libecere.so.0.44
[arturus@localhost clock]$ 
and then hitting 'make' again in that sdk/ecere/ subdirectory and see what happens. It should build libecere.so and then invoke ear to add the resources to it.
I didn't run the above command because that path does not exist.
Are you using a shell different than bash? I don't know what could have caused this either.
No, Im using standard bash:

Code: Select all

[arturus@localhost clock]$ bash -version
GNU bash, version 4.0.38(1)-release (i386-redhat-linux-gnu)
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
[arturus@localhost clock]$ 
Hoping we can resolve this together soon!

Jerome
Me too! I would like very much to be able to use Ecere SDK. I've been reading the Tao and find it a great work from you and very helpful to learn eC. Thanks for your help.

Arturus
Author:  jerome [ Fri Aug 20, 2010 1:50 pm ]
Post subject:  Re: Linux - Install Ecere in Fedora 12

I'm assuming the libraries were installed in /usr/lib/ (libecere.so, libec.so, libecereCOM.so), and the binaries in /usr/bin (ecp, ecc, ecs, ear, ide).

Apart from libecere.so missing the resources, those seem to be working fine.

Now what I'm a bit puzzled with is that directory you're working in, e.g. that samples directory.
Could it be possible that there is a permission restriction issue there?
Have you tried building as root? (Just in case some files were mistakenly written by root and thus not letting you update them as a regular user).

Let's assume your clock sample is in (otherwise please adjust the paths):

/home/arturus/Download/ecere/samples/guiAndGfx/clock/

Within that directory, the Makefile tries to create a debug/ dir.
Is there a /home/arturus/Download/ecere/samples/guiAndGfx/clock/debug/ directory or not?

You said there was not, but then you said make reported:

[arturus@localhost clock]$ make -f clock-Debug.Makefile debug/clock.c
make: `debug/clock.c' is up to date.

Is there a debug/clock.c or not?

If there is not make shouldn't be saying that.

The other weird thing is the output from make clean you pasted:

[arturus@localhost clock]$ make -f clock-Debug.Makefile clean
make: `clean' is up to date.

Usually that should not output anything.
clean is up to date is something you will usually get if you have a file 'clean' in that directory ...
(In fact the Makefile should probably mark clean as .PHONY to make sure a file called 'clean' won't cause a problem)

The sdk/ folder I was referring to seems to be your /home/arturus/Download/ecere/
(The place where you extracted the contents of the tarball, I don't remember if it has a top level sdk directory or not, it might be ecere-sdk-0.44-pre1)
So that's where you can try to do rm 'ecere/obj/libecere.so.0.44' , and then try a make again to see if that will add your resources to the library. Pay attention to see if it tries to run ear and successfully adds the resources ( It will say "Adding bla bla... 67%" with the compression ratio for each resource )

Please try these things and let me know, thanks again for your help figuring this out and sorry for the inconvenience. I really wonder what's going on.

Cheers,

Jerome
Author:  arturus [ Fri Aug 20, 2010 8:34 pm ]
Post subject:  Re: Linux - Install Ecere in Fedora 12

Yes those libraries were installed where you said.

What permissions are needed for the directory where ecere was installed? It was installed in the standard download user directory of Fedora. I did not change any permissions. I install there the software that I am testing when it does not have a RPM which is very rare in my case.

Yes my clock sample is in /home/arturus/Download/ecere/samples/guiAndGfx/clock/
(Please note that 'arturus' is not my real user name in the system. I've been changing it to arturus when posting here).

I've been working as User, not Root. However I did try a few minutes ago to build as root (sudoing) if you mean by 'building' issuing the command 'make' (like in 'make -f clock-Debug.Makefile debug/clock.c') and the result was the same: 'debug/clock.c: No such file or directory'.

No, there is not a /home/arturus/Download/ecere/samples/guiAndGfx/clock/debug/ directory but Make keeps saying 'debug/clock.c' is up to date. Next is a DIR of the clock folder with and without sudoing. My settings settings are 'Show hidden files':

Code: Select all

[arturus@localhost ~]$ dir  Download/ecere/samples/guiAndGfx/clock
clock-Debug.Makefile  clock.ec	clock.epj  clock.ews  LICENSE
[arturus@localhost ~]$ sudo dir Download/ecere/samples/guiAndGfx/clock
[sudo] password for arturus: 
clock-Debug.Makefile  clock.ec	clock.epj  clock.ews  LICENSE
[arturus@localhost ~]$
I don't know why make is saying 'debug/clock.c' is up to date.

I did tru to Run the SMTP sample and got the same error:

Code: Select all

Default Compiler

smtp-Debug.Makefile - Makefile doesn't exist. Generating  makefile for Debug config...

Building project smtp using the Debug configuration...

Compiling...

-o

   gcc: debug/smtp.c: error: No such file or directory

   gcc: no input files

smtp (Debug) - 1 error, no warning   
Could it be that I need to configure something in the IDE? I did not configure anything.

No there was no sdk directory.

As you instructed I removed 'ecere/obj/libecere.so.0.44' and ran 'make' as user from the /home/arturus/Download/ecere/ folder. The output console is here (no EAR and no "adding bla bla..").

Code: Select all

[arturus@localhost ~]$ cd Download/ecere
[arturus@localhost ecere]$ make
Bootstrapping eC compiling tools...
Building ecere...
Building ec...
Building ecp...
Building ecc...
Building ecs...
All done!
Building dependencies...
Building libungif...
Building 2nd stage ecere...
Building Vanilla Ecere...
Building 2nd stage compiler
Building 2nd stage libec...
Building 2nd stage ecp...
Building 2nd stage ecc...
Building 2nd stage ecs...
Building eC Core Runtime...
Building IDE...
Building epj2make...
Building Documentor...
Building EDA...
The Ecere SDK is fully built.
[arturus@localhost ecere]$
Now I'm going to open the IDE and try to Run another sample. Now the PrimeTest. Project/Open/ changing directory to samples and opening PrimeTest, Then clicked Run. result is this:

Code: Select all

Default Compiler

PrimeTest-Debug.Makefile - Makefile doesn't exist. Generating  makefile for Debug config...

Building project PrimeTest using the Debug configuration...

Compiling...

-o

   gcc: debug/findPrime.c: error: No such file or directory

   gcc: no input files



PrimeTest (Debug) - 1 error, no warning


Contents of FindPrime folder are these files:
findPrime.ec PrimeTest-Debug.Makefile PrimeTest.epj PrimeTest.ews
and there is no debug folder inside.

Cheers.

Arturus
Author:  jerome [ Fri Aug 20, 2010 9:06 pm ]
Post subject:  Re: Linux - Install Ecere in Fedora 12

Ok the reason you didn't see the 'adding resources' is because you did the make at the top level, rather than in ecere/ecere/ . Have you tried a 'sudo make install' anyways to see if the resources are there now?

inside the clock sample can you do:

make -f clock-Debug.Makefile objdir

that is supposed to create the debug/ directory.
You can try also to create the debug/ directory yourself to see if that helps...

At this point this is so strange I'm really going around in circles wondering what's going on.
On CentOS 5.5 and RedHat 5 everything goes very smoothly...

(Apart from a problem with an old version of X.org that causes apps to freeze when you press a key if you don't disable the Input Method system - a 1 line to comment in XInterface.ec (XopenIM call) )

Could there be anyway you can give me access to your system so I can see what's going on, or tell me exactly how to reproduce the environment you have, perhaps by installing Fedacore, but how different is it from CentOS? Could you think of anything out of the default setup in your environment that could cause these problems?

It really isn't anything eC/Ecere specific here, it's purely a make / Makefile issue... Could you upload your generated clock sample Makefile here?
Author:  arturus [ Sat Aug 21, 2010 11:12 am ]
Post subject:  Re: Linux - Install Ecere in Fedora 12

Hi,
jerome wrote:Ok the reason you didn't see the 'adding resources' is because you did the make at the top level, rather than in ecere/ecere/ . Have you tried a 'sudo make install' anyways to see if the resources are there now?
Running 'sudo make install' from Download/ecere/ecere gives
'make: *** No rule to make target `install'. Stop. '
and from Download/ecere gives
'The Ecere SDK has been installed.' There is no other feedback in both cases.
inside the clock sample can you do:

make -f clock-Debug.Makefile objdir

that is supposed to create the debug/ directory.
The output was 'make: Nothing to be done for `objdir'' and no debug/ directory was created.
You can try also to create the debug/ directory yourself to see if that helps...
Creating it...
My Gosh! Look at the Output showed by the IDE:

Code: Select all

Default Compiler

Building project clock using the Debug configuration...

Generating symbols...

clock.ec

Compiling...

clock.ec

clock.c

Writing symbol loader...

clock.main.ec

clock.main.ec

clock.main.c

Linking...



clock (Debug) - no error, no warning
Wow! And more... the graphic symbols inside the buttons are now visible!!! Amazing... :?

Could this be a klue for you, Jerome? For me the IDE does not or cannot create the debug folder. I will try now the "hello world" and the simple form I was trying before. I'll tell you the result later. I have just noticed that the clock is running on my desktop and I don't see how to close the application. The IDE is already closed. On the SystemMonitor I see 2 clocks but don't know if it is the sample or the system clock. So I'll have to reboot. :(

Meanwhile, I found this on the web that could help to build a RPM for Fedora but I'm very 'green' on Linux.:

Installing Software from Source Code in an RPM-based Linux Distribution
http://www.brighthub.com/computing/linu ... 18300.aspx
At this point this is so strange I'm really going around in circles wondering what's going on.
On CentOS 5.5 and RedHat 5 everything goes very smoothly...

(Apart from a problem with an old version of X.org that causes apps to freeze when you press a key if you don't disable the Input Method system - a 1 line to comment in XInterface.ec (XopenIM call) )

Could there be anyway you can give me access to your system so I can see what's going on, or tell me exactly how to reproduce the environment you have, perhaps by installing Fedacore, but how different is it from CentOS? Could you think of anything out of the default setup in your environment that could cause these problems?

It really isn't anything eC/Ecere specific here, it's purely a make / Makefile issue... Could you upload your generated clock sample Makefile here?
Ok. Attached.

Cheers.

Arturus
Author:  jerome [ Sat Aug 21, 2010 11:21 am ]
Post subject:  Re: Linux - Install Ecere in Fedora 12

The first thing I'd like you to confirm, is if you have a permission as the user running the ide or make file (I assume that to be your regular user) to create that directory...
It really feels like that is the problem.

These lines in the Makefile do that:

mkdirq = $(if $(1),-@mkdir -p $(1))

objdir:
$(if $(wildcard $(OBJ)),,$(call mkdirq,$(OBJ)))


When I asked you to do make in ecere/ecere/, I meant 'make', not 'make install'

Only the top level Makefile has the install rules.

You should be able to close the clock application by clicking on it and either pressing Escape or Alt-F4. You can always resort to using the 'xkill' application, which lets you click on the application to kill.

I'm glad we've made some progress and got things running! The buttons, doing make again probably did it... Something must have gone wrong the first time you built the SDK (strange).

I'm still clueless though about why the Makefile can't create the debug/ directory for you!
So if you figure that out, please let me know!

Thanks for your courage and perseverance to try out Ecere :)

All the best,

Jerome
Author:  arturus [ Sat Aug 21, 2010 12:42 pm ]
Post subject:  Re: Linux - Install Ecere in Fedora 12

Hi,

Yes (of course and I have just confirmed using console) I can create directories in the Download folder as the regular and only user of the system.

I have tested treeView and HelloForm samples. Both run. Both have the correct and visible (!) buttons to Close the application. The clock sample doesn't and clicking on it or ALT-F4 do nothing. None of the firts two samples has a debug/ directory. What they have is 'HelloForm/obj/debug.linux' and '/treeView/obj/default.linux'. So it seems the debug/ directory is not necessary?

Well, I'm going back to Tao :) My target is to be able to create applications for Windows and Linux using a SDK/IDE installed on Linux and a object-oriented programming language. Your eC language and Ecere SDK they seem to have it all and I'm very excited with the idea. Thank you very much for the constant support and everything else.

Arturus
Author:  jerome [ Sat Aug 21, 2010 12:50 pm ]
Post subject:  Re: Linux - Install Ecere in Fedora 12

I was saying either Escape or Alt-F4.
I just checked the code, and Alt-F4 won't work, but Escape will:

Code: Select all

   bool OnKeyDown(Key key, unichar ch)
   {
      if(key == escape) Destroy(0);
      return true;
   }
The intermediate objects/target directories can be changed in the project settings.

I'm still puzzled about that sample, maybe one day we will know what was going on ;)
But I'm glad you're back on track and can start doing some coding!
'Cause that's what it's all about! :D

You're most welcome and I'm glad you're finding Ecere useful.
At one point we had a cross-compiler set up on Linux so you could use it to build Windows application directly from your Linux box...
Redj was setting that up, I never actually got it working on my system... But the IDE has the options to support an additional cross-compiler, so if you can manage to install the cross-compiler for MinGW you'll be able to produce both Linux and Windows apps right from the Ecere IDE in Linux.

Enjoy

Jerome

PS: Come join us on IRC if you have a chance! You get live support there :)

http://webchat.freenode.net/?channels=ecere
Author:  arturus [ Sat Aug 21, 2010 4:29 pm ]
Post subject:  Re: Linux - Install Ecere in Fedora 12

Hello,
jerome wrote:I was saying either Escape or Alt-F4.
Sorry, I thought it was Close and Alt-F4.
...
I'm still puzzled about that sample, maybe one day we will know what was going on ;)
May be but only if it was something during install and I collected the logs and posted them here. I don't use to modify permissions or do odd things on any computer and not in my company computer where I work everyday.
But I'm glad you're back on track and can start doing some coding!
'Cause that's what it's all about! :D
Yeah, but I am a little disappointed because, reading the Overview of Ecere I understood I could cross compiling in the sense that I could run the SDK under Linux and create executable files for Linux and for Windows. Now I understand that I still need a Windows box. And who knows if the source code would have to be modified too. So Ecere is more like other development environments than I thought. Thanks God it's OO.
You're most welcome and I'm glad you're finding Ecere useful.
At one point we had a cross-compiler set up on Linux so you could use it to build Windows application directly from your Linux box...
Redj was setting that up, I never actually got it working on my system... But the IDE has the options to support an additional cross-compiler, so if you can manage to install the cross-compiler for MinGW you'll be able to produce both Linux and Windows apps right from the Ecere IDE in Linux.
It is a pity indeed because If you and Redj couldn't manage to install the cross-compiler for MinGW I don't think I will.

Thanks anyway. I'll read more of the Tao and try the IDE. If I can't do what I'm looking for I will continue my 'qwest for the perfect SDK".

Thank you,

Arturus
Author:  jerome [ Sat Aug 21, 2010 4:51 pm ]
Post subject:  Re: Linux - Install Ecere in Fedora 12

You won't need to change any line of code, all code using Ecere should be fully cross-platform, although testing it out on Windows is generally a good idea. Sometimes differents fonts or something like this might make your app look bad on a different platform.

Redj did get the MinGW cross-compiler working on his Linux box.
I've bugged him to tell me his secrets, but I never really spent time to try it out myself...
If you want I'd be happy to take a look at that with you to get it working.

Sorry for the disappointment. But really all of the Ecere SDK supports that cross-compiler, it's just a matter of getting a cross-compiling GCC for a MinGW target working correctly on your system. (Which is feasible). We hope to have clear instructions on how to set this up or install it as part of the installer to make things easy as well. So, again I'll be happy to help you out with this.

I sure hope you can do what you're looking for! Ecere *is* the perfect SDK :) At least for us it is :D

Cheers,

Jerome
All times are UTC-05:00 Page 2 of 3