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 » src package should now work just fine in Linux and BSD
src package should now work just fine in Linux and BSD [message #20929] Sun, 19 April 2009 14:02 Go to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
I have spend some time trying to fix src package.

I believe it should now work quite fine on most system, including initial U++ setup.

I mean

make
make install
~/theide

and you should be running.

I would be glad to hear reports how well it really works. Anybody with POSIX system, please report!

(If you happen to fix 'domake' or 'doinstall' scripts too, post here Wink

Mirek

[Updated on: Sun, 19 April 2009 14:02]

Report message to a moderator

Re: src package should now work just fine in Linux and BSD [message #20945 is a reply to message #20929] Mon, 20 April 2009 15:39 Go to previous messageGo to next message
phirox is currently offline  phirox
Messages: 49
Registered: December 2007
Member
I got it working eventually, but it really needed some help.

First:
sh domake
domake: line 18: syntax error: unexpected end of file
make: *** [all] Error 2

This is caused because lines are terminated by CRLF instead of just LF(posix style).

Second:
I had my subversion sources in ~/uppsvn, the whole src script is hardcoded to use ~/upp.src

Third:
The script uses ~/bin/theide, this should be configurable or autodetected(preferable)

Fourth:

The script starts removing stuff! This is really dangerous considering the generic named ~/upload, ~/upp.tmp is more safe because it has the product name in it. (even though everyone should have backups of course Smile)

Fifth:

It doesn't copy the uppsrc directory to ~/upp.tmp , I'll give it a look later if this is the correct way.

My own insights:
Theoretically on linux it is preferably to do everything within the unpacked source tree, incl. temporary files. And you will still need an initial binary to generate the Makefile, or is this going to be included with every stable release?

I am working on some changes for the src script to autodetect points 2 and 3. I will add that later.
Re: src package should now work just fine in Linux and BSD [message #20947 is a reply to message #20945] Mon, 20 April 2009 16:18 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
phirox wrote on Mon, 20 April 2009 09:39

I got it working eventually, but it really needed some help.

First:
sh domake
domake: line 18: syntax error: unexpected end of file
make: *** [all] Error 2

This is caused because lines are terminated by CRLF instead of just LF(posix style).

Second:
I had my subversion sources in ~/uppsvn, the whole src script is hardcoded to use ~/upp.src

Third:
The script uses ~/bin/theide, this should be configurable or autodetected(preferable)

Fourth:

The script starts removing stuff! This is really dangerous considering the generic named ~/upload, ~/upp.tmp is more safe because it has the product name in it. (even though everyone should have backups of course Smile)

Fifth:

It doesn't copy the uppsrc directory to ~/upp.tmp , I'll give it a look later if this is the correct way.

My own insights:
Theoretically on linux it is preferably to do everything within the unpacked source tree, incl. temporary files. And you will still need an initial binary to generate the Makefile, or is this going to be included with every stable release?

I am working on some changes for the src script to autodetect points 2 and 3. I will add that later.



I am afraid we got two things mixed. I am speaking about the 'product', downloadable here:

http://code.google.com/p/upp-mirror/downloads/detail?name=up p-src-1078.tar.gz&can=2&q=#makechanges

I believe you are, at least partially, speaking about infrastructure scripts used to create this 'product'.

Am I right?

Still, CRLF issue perhaps holds, but I have not had any problems with it yet. What system you are on?

Mirek
Re: src package should now work just fine in Linux and BSD [message #20950 is a reply to message #20947] Mon, 20 April 2009 16:49 Go to previous messageGo to next message
phirox is currently offline  phirox
Messages: 49
Registered: December 2007
Member
Ah yes! Laughing

Well I tried again, and the domake file had the same issue as before. (fixed with the command "busybox dos2unix domake").

I use: Gentoo Linux 2.6.28-hardened-r7 #1 SMP x86_64 AMD GNU/Linux

After that it compiled correctly. And also does not have any of the above mentioned 'issues'.

[Updated on: Mon, 20 April 2009 16:50]

Report message to a moderator

Re: src package should now work just fine in Linux and BSD [message #20956 is a reply to message #20929] Tue, 21 April 2009 08:14 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3355
Registered: August 2008
Senior Veteran
Hello luzr

I had the same problem that phirox had but the fix "busybox dos2unix domake" also worked for me.

Ide compiled right: Ubuntu 8.10 32 bits.

Best regards
Koldo


Best regards
Iñaki
Re: src package should now work just fine in Linux and BSD [message #20957 is a reply to message #20956] Tue, 21 April 2009 20:41 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
I hope that issue should be now fixed. Please check.

Mirek
Re: src package should now work just fine in Linux and BSD [message #20958 is a reply to message #20929] Tue, 21 April 2009 22:49 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3355
Registered: August 2008
Senior Veteran
Hello luzr

When I enter http://code.google.com/p/upp-mirror/downloads/list I see in the top of the list:

upp-win32-1091.exe automated_build 83 minutes ago
upp-src-1078.tar.gz nightly_build 43 hours ago


It seem it is not possible to get the corresponding upp-src-1091.tar.gz file.

Best regards
Koldo




Best regards
Iñaki
Re: src package should now work just fine in Linux and BSD [message #20960 is a reply to message #20958] Tue, 21 April 2009 23:27 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
I am sorry, I am having 'issues' whith automated builds right now. Working on it...

Mirek
Re: src package should now work just fine in Linux and BSD [message #20963 is a reply to message #20960] Wed, 22 April 2009 08:14 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3355
Registered: August 2008
Senior Veteran
One question

Now the file that appears is "upp-x11-src-1091.tar.gz".

Does it mean that it only can be used in Posix systems?

Best regards
Koldo


Best regards
Iñaki
Re: src package should now work just fine in Linux and BSD [message #20964 is a reply to message #20963] Wed, 22 April 2009 08:55 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
koldo wrote on Wed, 22 April 2009 02:14

One question

Now the file that appears is "upp-x11-src-1091.tar.gz".

Does it mean that it only can be used in Posix systems?

Best regards
Koldo


Well, the make/install (Makefile, doinstall) process is for X11/GCC systems only (and, I guess, right now it will not work on all either - but that is something to fix gradually).

Of course, there are standard U++ packages with universal sources in it.

I believe it might work on all x86 Linuxes and maybe all BSDs, somebody should check with Solaris...

Mirek
Re: src package should now work just fine in Linux and BSD [message #20966 is a reply to message #20929] Wed, 22 April 2009 09:02 Go to previous messageGo to next message
cocob is currently offline  cocob
Messages: 156
Registered: January 2008
Experienced Member
does not work on solaris sparc with gcc 4.3
I think the problem is

#if __linux
#define PLATFORM_LINUX 1
#else // ToDo
#define PLATFORM_BSD 1
#define PLATFORM_FREEBSD 1
#endif

cocob

[Updated on: Wed, 22 April 2009 09:09]

Report message to a moderator

Re: src package should now work just fine in Linux and BSD [message #20968 is a reply to message #20966] Wed, 22 April 2009 10:53 Go to previous messageGo to next message
masu is currently offline  masu
Messages: 378
Registered: February 2006
Senior Member
cocob wrote on Wed, 22 April 2009 09:02

does not work on solaris sparc with gcc 4.3
I think the problem is

#if __linux
#define PLATFORM_LINUX 1
#else // ToDo
#define PLATFORM_BSD 1
#define PLATFORM_FREEBSD 1
#endif

cocob


I am about to prepare the next OpenBSD patch set (the last one was not included by Mirek until now), I modified this section to:
#if __unix || __unix__
...
#if __linux
        #define PLATFORM_LINUX 1
#else // ToDo
        #if _FreeBSD_
                 #define PLATFORM_BSD 1
                 #define PLATFORM_FREEBSD 1
        #elif _OpenBSD_
                 #define PLATFORM_BSD 1
                 #define PLATFORM_OPENBSD 1
        #else
                 #error Unknown OS !
        #endif
#endif
#endif


I do not have the actual code here, but it could also be __*BSD__ instead of _*BSD_. And maybe one could use _Solaris_ for Solaris OS or whatever is defined by installed GCC.

Matthias
Re: src package should now work just fine in Linux and BSD [message #20970 is a reply to message #20968] Wed, 22 April 2009 13:28 Go to previous messageGo to next message
phirox is currently offline  phirox
Messages: 49
Registered: December 2007
Member
#ifdef __sun
  #define PLATFORM_SUN 1
#endif


This is for solaris, works for both the sun compiler and gcc.
Re: src package should now work just fine in Linux and BSD [message #20973 is a reply to message #20929] Wed, 22 April 2009 17:43 Go to previous messageGo to next message
cocob is currently offline  cocob
Messages: 156
Registered: January 2008
Experienced Member
did you managed to build upp with sun compiler ??

cocob
Re: src package should now work just fine in Linux and BSD [message #20975 is a reply to message #20964] Thu, 23 April 2009 00:20 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3355
Registered: August 2008
Senior Veteran
Hello luzr

Now it compiles well.

Best regards
Koldo


Best regards
Iñaki

[Updated on: Thu, 23 April 2009 00:33]

Report message to a moderator

Re: src package should now work just fine in Linux and BSD [message #20978 is a reply to message #20968] Thu, 23 April 2009 16:16 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
masu wrote on Wed, 22 April 2009 04:53

cocob wrote on Wed, 22 April 2009 09:02

does not work on solaris sparc with gcc 4.3
I think the problem is

#if __linux
#define PLATFORM_LINUX 1
#else // ToDo
#define PLATFORM_BSD 1
#define PLATFORM_FREEBSD 1
#endif

cocob


I am about to prepare the next OpenBSD patch set (the last one was not included by Mirek until now), I modified this section to:
#if __unix || __unix__
...
#if __linux
        #define PLATFORM_LINUX 1
#else // ToDo
        #if _FreeBSD_
                 #define PLATFORM_BSD 1
                 #define PLATFORM_FREEBSD 1
        #elif _OpenBSD_
                 #define PLATFORM_BSD 1
                 #define PLATFORM_OPENBSD 1
        #else
                 #error Unknown OS !
        #endif
#endif
#endif


I do not have the actual code here, but it could also be __*BSD__ instead of _*BSD_. And maybe one could use _Solaris_ for Solaris OS or whatever is defined by installed GCC.

Matthias


It is actually sort of question whether we need both (BSD and specificBSD). In fact, I guess I should change all #ifdef PLATFORM_FREEBSD to just PLATFORM_BSD.

If you are going to fix for OpenBSD, this is the first thing to try.

Mirek
Re: src package should now work just fine in Linux and BSD [message #20979 is a reply to message #20970] Thu, 23 April 2009 16:17 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
phirox wrote on Wed, 22 April 2009 07:28

#ifdef __sun
  #define PLATFORM_SUN 1
#endif


This is for solaris, works for both the sun compiler and gcc.


Well, through the code, there is PLATFORM_SOLARIS used...

Mirek
Re: src package should now work just fine in Linux and BSD [message #20981 is a reply to message #20978] Thu, 23 April 2009 16:20 Go to previous messageGo to next message
masu is currently offline  masu
Messages: 378
Registered: February 2006
Senior Member
There where subtle differences in the past between FreeBSD and OpenBSD, that is why I still needed PLATFORM_OPENBSD.
I will double check ...

Matthias
Re: src package should now work just fine in Linux and BSD [message #20983 is a reply to message #20981] Thu, 23 April 2009 16:22 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
masu wrote on Thu, 23 April 2009 10:20

There where subtle differences in the past between FreeBSD and OpenBSD, that is why I still needed PLATFORM_OPENBSD.
I will double check ...

Matthias


OK.

Looking forward to patches.

Mirek
Re: src package should now work just fine in Linux and BSD [message #20987 is a reply to message #20983] Thu, 23 April 2009 23:10 Go to previous messageGo to previous message
masu is currently offline  masu
Messages: 378
Registered: February 2006
Senior Member
Here it is:
http://www.ultimatepp.org/forum/index.php?t=msg&goto=209 74&#msg_20974
PLATFORM_BSD flag unification seems to work Cool.
I also added NetBSD, but cannot test it here, maybe somebody can check that ...

Matthias
Previous Topic: Router problems...
Next Topic: Real name
Goto Forum:
  


Current Time: Thu Mar 28 22:48:20 CET 2024

Total time taken to generate the page: 0.02256 seconds