Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Community » U++ community news and announcements » Upp 2007.1rc4 released
Re: Upp 2007.1rc4 released [message #8832 is a reply to message #8831] Mon, 02 April 2007 18:14 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 12571
Registered: November 2005
Ultimate Member
ebojd wrote on Mon, 02 April 2007 11:53

Ok...

Mirek/fallingdutch, can we get the Linux Makefiles polished up before rc5? I should be able to spend a little time on it this later today. If you are up for it I'll post more questions/comments in the process.

EBo --



Just a side-note: I have so far deliberately stayed away from Makefile and anything related. The only thing I can do for you is to apply Makefile generator patch:)

Mirek
Re: Upp 2007.1rc4 released [message #8833 is a reply to message #8832] Mon, 02 April 2007 18:55 Go to previous messageGo to next message
ebojd is currently offline  ebojd
Messages: 225
Registered: January 2007
Location: USA
Experienced Member
OK... What do you mean by "Makefile generator patch"?

EBo --
Re: Upp 2007.1rc4 released [message #8834 is a reply to message #8833] Mon, 02 April 2007 20:30 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 12571
Registered: November 2005
Ultimate Member
ebojd wrote on Mon, 02 April 2007 12:55

OK... What do you mean by "Makefile generator patch"?

EBo --



There is Makefile generator in TheIDE. "Makefile generator patch" is a patch to improve it Wink

I do not pretend to understand how that code works.

Mirek
Re: Upp 2007.1rc4 released [message #8842 is a reply to message #8822] Tue, 03 April 2007 07:41 Go to previous messageGo to next message
fallingdutch is currently offline  fallingdutch
Messages: 258
Registered: July 2006
Experienced Member
Good Morning,
ebojd wrote on Mon, 02 April 2007 15:02

I pulled a bonehead yesterday when I wrote the upp-portage ebuild for rc4 and just removed the old rc3 before testing rc4... DOH.

Here is a patch for the top Makefile and some questions for the uppsrc/ide/Makefile.

*) is there a reason why pkg-config was not used in the uppsrc/ide/Makefile instead of hardcoding?


the uppsrc/ide/Makefile is a slightly changed Makefile which was generated by theide and theide hardcodes it.

ebojd wrote on Mon, 02 April 2007 15:02


Top level Makefile:

*) move all: before theide: -- if no arguments are given to make,
it will run the first one which is assumed to be all.


yes, sounds good.
ebojd wrote on Mon, 02 April 2007 15:02


*) added - infront of install so that it will deal appropriately
with files that already exist, etc.


what did you do? don't see the change in the patch either.

ebojd wrote on Mon, 02 April 2007 15:02


*) added trailing / to all install (cp -r *) lines. I do
not know where the bug is, but it will sometimes install
the files in a directory one above the destination.


yes, thought they have been there as you see the install lines.
ebojd wrote on Mon, 02 April 2007 15:02


*) remove clean from all -- because the "make all" and "make
install" are seperate.


ok
ebojd wrote on Mon, 02 April 2007 15:02


*) added mkdir -p before copying Common and other files.
"cp -r Common /usr/share/upp" will not copy the Common
diretory into /usr/share/upp but it's contents.


yes sure makes sense
ebojd wrote on Mon, 02 April 2007 15:02


*) current Makefiles break gentoo's multithreaded make. I'll
have to investigate this one.


please do so, i would like the makefile to run on as many systems as possible

ebojd wrote on Mon, 02 April 2007 15:02


*) change $(DESTDIR)/usr/... to $(DESTDIR)/... -- if the DESTDIR
is set to usr, then everything is installed into /usr/usr.
Destdir should be set to something reasonable like /usr, /opt,
etc.



I am sorry, but that is impossible for me - the package builder asks for a $DESTDIR to create a temporary folder where the root directory is simulted to create the package.
Any Idea how to get around this are welcome!

ebojd wrote on Mon, 02 April 2007 15:02


I'm currently rebuilding upp (hopefully for the last time), but the folling patches should be helpful. I'll post the new upp-portage as soon as I know that it builds properly and pasts the QA tests.

The patch file should be attached.


Thank you a lot for your help, will apply all patches except the ones with $DESTDIR

Bas
Re: Upp 2007.1rc4 released [message #8843 is a reply to message #8833] Tue, 03 April 2007 07:44 Go to previous messageGo to next message
fallingdutch is currently offline  fallingdutch
Messages: 258
Registered: July 2006
Experienced Member
ebojd wrote on Mon, 02 April 2007 18:55

OK... What do you mean by "Makefile generator patch"?



The uppsrc/ide/Makefile is generated by Ultimate++ with the Makefilegenerator (Build->create Makefile)

Bas

[Update:] attached the current top-level Makefile.
Ebo if you would have a look at it then i will release .rc5
  • Attachment: Makefile
    (Size: 1.04KB, Downloaded 208 times)

[Updated on: Tue, 03 April 2007 07:51]

Report message to a moderator

Re: Upp 2007.1rc4 released [message #8844 is a reply to message #8842] Tue, 03 April 2007 15:35 Go to previous messageGo to next message
ebojd is currently offline  ebojd
Messages: 225
Registered: January 2007
Location: USA
Experienced Member

Sorry for the delay. I got home and went promptly to sleep last night...

fallingdutch wrote on Tue, 03 April 2007 00:41


ebojd wrote on Mon, 02 April 2007 15:02


*) added - infront of install so that it will deal appropriately
with files that already exist, etc.


what did you do? don't see the change in the patch either.



The comment should have read "added a '-' in front of install and
cp...". Adding a '-' infront of a makefile directive instructs make to continue processing even if an error offurs. That way I can work on as many bugs as possible at one compile Wink This should likely be removed from the final version. We might want to discuss that
though.


fallingdutch wrote on Tue, 03 April 2007 00:41


ebojd wrote on Mon, 02 April 2007 15:02


*) added trailing / to all install (cp -r *) lines. I do
not know where the bug is, but it will sometimes install
the files in a directory one above the destination.


yes, thought they have been there as you see the install lines.



Sorry, my bad. This was a misattempt to fix the copy problem
mentioned below (that was eventually solved by first creating the
directory with "mkdir -p". It should be removed.

fallingdutch wrote on Tue, 03 April 2007 00:41


ebojd wrote on Mon, 02 April 2007 15:02


*) current Makefiles break gentoo's multithreaded make. I'll
have to investigate this one.


please do so, i would like the makefile to run on as many systems as possible



This one is subtle... Basically, make can run in multi threaded
mode. Gentoo portage by default sets the number of processes (or
jobs) to be the number of processors in the system +1. It appears that how make does this is for each given target run all dependencies simultaniously. So, when we get to ide/Makefile's lines:

all: install $(OutFile)

install:
-mkdir -p $(OutDir)
-mkdir -p $(OutDir_ide)
...

$(OutFile): \
$(OutDir_ide)SelectPkg.o \
$(OutDir_ide)UppWspc.o \
...

make will start the compilation of $(OutDir_ide)SelectPkg.o
simultaniously with making the $(OutDir_ide), etc., directories. So the problem is basically a race condition.

It is going to take me a little time to figure out how to patch this in a sane manner. My first attempts will be to play with the ordering of the dependencies...

I would also like to rename the install directive to pre-build or
something more intuitive because this one is not *really* installing anything, but preparing the system to build.

something along the lines of:


all: prebuild
$(MAKE) $(OutFile)

prebuild:
-mkdir -p $(OutDir)
-mkdir -p $(OutDir_ide)
...

$(OutFile): \
$(OutDir_ide)SelectPkg.o \
$(OutDir_ide)UppWspc.o \
...

There is probably a better way to fix the dependencies, but it is
alluding in this red hot moment.


fallingdutch wrote on Tue, 03 April 2007 00:41


ebojd wrote on Mon, 02 April 2007 15:02


*) change $(DESTDIR)/usr/... to $(DESTDIR)/... -- if the DESTDIR
is set to usr, then everything is installed into /usr/usr.
Destdir should be set to something reasonable like /usr, /opt,
etc.



I am sorry, but that is impossible for me - the package builder asks for a $DESTDIR to create a temporary folder where the root directory is simulted to create the package.
Any Idea how to get around this are welcome!



The easy way, and possibly not the best, is to add /usr to $DESTDIR and remove it from the hardcoaded path. I will take a look at the relevent Makefile documentation and see how the Makefile builder can be modified to produce more standard Makefiles <see http://www.gnu.org/software/make/manual/make.html for ideas>


fallingdutch wrote on Tue, 03 April 2007 00:41


ebojd wrote on Mon, 02 April 2007 15:02


I'm currently rebuilding upp (hopefully for the last time), but the folling patches should be helpful. I'll post the new upp-portage as soon as I know that it builds properly and pasts the QA tests.

The patch file should be attached.



Thanks, and I'm testing...




Thank you a lot for your help, will apply all patches except the ones with $DESTDIR

Bas[/quote]


Ok. I can easily take care of the $DESTDIR problem myself.

Cheers!

EBo --

Re: Upp 2007.1rc4 released [message #8846 is a reply to message #8844] Tue, 03 April 2007 16:13 Go to previous messageGo to next message
fallingdutch is currently offline  fallingdutch
Messages: 258
Registered: July 2006
Experienced Member
did the above Makefile work for you so far, Ebo?

Bas
Re: Upp 2007.1rc4 released [message #8856 is a reply to message #8846] Tue, 03 April 2007 19:38 Go to previous messageGo to next message
ebojd is currently offline  ebojd
Messages: 225
Registered: January 2007
Location: USA
Experienced Member
Bas,

Yes, with the exception of $DESTDIR/usr issue, I was able to make a new ebuild for rc4. I was not able to test rc5 because the source had not been released onto sourceforge last I checked... I will check again.

EBo --
Re: Upp 2007.1rc4 released [message #8863 is a reply to message #8856] Tue, 03 April 2007 20:57 Go to previous messageGo to next message
ebojd is currently offline  ebojd
Messages: 225
Registered: January 2007
Location: USA
Experienced Member
Bas,

I just read that you were waitin on me while I was waiting for you... Sorry about that. Yes the Makefiles work with the exception noted. I will work on the gentoo multi-thread build issue during rc5 (so I do not hold the release up).

Thanks again,

EBo --
Re: Upp 2007.1rc4 released [message #8865 is a reply to message #8794] Wed, 04 April 2007 05:46 Go to previous messageGo to next message
exolon is currently offline  exolon
Messages: 62
Registered: July 2006
Location: 53'21N 6'18W
Member
Human deadlock? Smile
Re: Upp 2007.1rc4 released [message #8867 is a reply to message #8865] Wed, 04 April 2007 09:20 Go to previous messageGo to next message
fallingdutch is currently offline  fallingdutch
Messages: 258
Registered: July 2006
Experienced Member
sorry for the late reply.

I have been wondering why my build did not work an the problem is the patch to the Makefile moving all in front of theide, because my automagic package-build environment (downloading a complete "virgin" system, adding the packages listed in the control file and trying to build it) needs a build of the binary then changes to root and runs a "make install" like it should be -IMHO-. but when running a make now i have insuficient rights to create the dirs etc.

So you will need a "make && make install", hope that won't be to hard for you, Ebo Wink

Bas


Re: Upp 2007.1rc4 released [message #8876 is a reply to message #8867] Wed, 04 April 2007 19:21 Go to previous messageGo to next message
ebojd is currently offline  ebojd
Messages: 225
Registered: January 2007
Location: USA
Experienced Member
Hi Bas,

Separate make & make install is exactly how I run things anyway, so that is no problem.

Some thoughts on updates to the Makefile (and I'll do my best to help with this one if appropriate)...

One of the things that was customary in the *nix world, at least in the past, was to separate the build and the formal install process so that any user can build and test the system without root or administration privileges. That way you would build as a regular user, then su over to root to install any files into the base system. One of the nice advantages of setting DESTDIR without the /usr/ is that as a regular use I can do the install into my home directory by setting DESTDIR=/home/me. Likewise a sysadmin could choose nonstandard install locations (like /usr/local/ or /opt/upp). One of the things I forgot to add was the add a decent default to DESTDIR:

ifndef DESTDIR
DESTDIR=/usr
endif

all: theide

theide:
$(MAKE) -f uppsrc/ide/Makefile

last, if install is called directly it should depend on theide:

install: theide


The rest is mainly just a case of defining terms and what things mean.

uppsrc/ide/Makefile's install directive is actually not dealing with installation, but is a prebuild step to set up the expected directory structure for the build. This should probably be remanmed. There is still the issue of make being called with -j2 or more. I will have to play with this some more.

I need to get back to work but I'll spend some time on this tonight if I do not find myself back in bed with the flu or whatever it is that is kicking my kiester...

EBo --
Re: Upp 2007.1rc4 released [message #8877 is a reply to message #8865] Wed, 04 April 2007 19:24 Go to previous message
ebojd is currently offline  ebojd
Messages: 225
Registered: January 2007
Location: USA
Experienced Member
I wonder if being brain-dead is any relation to being in the middle of a human dead-lock... Probably Wink

EBo --
Previous Topic: Upp 2007.1rc3 released
Next Topic: Upp 2007.1rc5 released
Goto Forum:
  


Current Time: Sat Jul 04 14:07:31 CEST 2020

Total time taken to generate the page: 0.01263 seconds