public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* sem_getvalue patch
@ 2002-06-07  0:25 Robb, Sam
  2002-06-07  5:32 ` Nicholas Wourms
  0 siblings, 1 reply; 4+ messages in thread
From: Robb, Sam @ 2002-06-07  0:25 UTC (permalink / raw)
  To: cygwin

Folks,
 
I was seeing how well the latest version of arts compiled under Cygwin,
and noticed that the only real complaint was the lack of sem_getvalue()...
so I took the dive, fetched the latest Cygwin source from CVS, and poked
around to see what needed to be done.
 
With a little effort, I've managed to build a cygwin1.dll that exports
sem_getvalue().  The version of cygwin1.dll that I built seems subtly
hosed, though - while I can compile and run my test program from
within a Windows cmd.exe shell, trying to run bash or ls (and probably
a great many other things) hangs.
 
So, a couple of questions:
 
1) What's wrong with my cygwin1.dll?  Did I miss some special magic
I need to do in addition to adding an export to cygwin.din?
 
2) Assuming that I can resolve the apparent export problem and produce
a working cygwin1.dll, is there any interest in a patch for sem_getvalue()?
Or was it left unimplemented for a reason (other than lack of need/time?)
 
  Thanks,
 
-Samrobb

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: sem_getvalue patch
  2002-06-07  0:25 sem_getvalue patch Robb, Sam
@ 2002-06-07  5:32 ` Nicholas Wourms
  2002-06-07  6:15   ` Nicholas Wourms
  0 siblings, 1 reply; 4+ messages in thread
From: Nicholas Wourms @ 2002-06-07  5:32 UTC (permalink / raw)
  To: Robb, Sam, cygwin; +Cc: kde-cygwin

Sam,

This has been discussed in the past, but I'll fill you in.  First off,
kde-cygwin does NOT use the native semaphores for shared memory.  These
symbols are turned off by default when cygwin is built.  If you wish to
use them via the native cygserver, you must patch the sources for them to
work.  Please see:
http://www.cygwin.com/ml/cygwin-developers/2002-03/msg00000.html

Now this code is highly unstable, but I do encourage you to give it a try,
as we need feedback on how cygserver works with kde.  Now for the hard
part...  Kde-cygwin is compiled against the independant cygipc code, which
also impliments SysV IPC shared memory.  You can learn more about this at:
http://www.neuro.gatech.edu/users/cwilson/cygutils/cygipc/index.html

Now here's the rub, cygipc has been deprecated in favor of the native
cygserver.  The reason cygipc isn't being used is one of licensing, as the
cygipc code was gleaned in part from the linux kernel and therefore cannot
be a part of cygwin's dll (according to the license).  Even worse is the
difference in the size of the key_t operation, where cygipc implements it
as 32bit and cygserver uses 64bit for reasons I will not go into detail
on.  So what does this mean?  If you enable and use cygserver, any
binaries compiled with cygipc shm will be broken.  This includes the kde
version of X11, QT, and KDE itself.  However, Chuck has made it quite
clear that the original cygipc is deprecated and therefore no longer
accepting patches.  Again, we really need someone to put cygserver through
its routines, so here is what I suggest:

1)Remove the kde X11, QT, and KDE bianaries.
2)Remove the cygipc package (very important as it's headers confilict with
cygserver).
3)Download the latest cvs cygwin sources and patch for cygserver support.
4)Start up the "cygserver &"
4)Compile and run Roberts test suite.
5)Assuming all goes well...
6)Politely ask Ralf to repost his patches for the X11 server and the magic
configuring option needed to turn on shm support in X11.
7)Follow the instructions to obtain the X11 source, given at:
http://xfree86.cygwin.com/docs/cg/cygwin-xfree-cg.html
8)Add Ralf's patches and recompile X11, and assuming it compiled, install
it.
9)Recompile and install QT from the latest kde-cygwin cvs sources.
10)Recompile and install kde.
11)Debug, Debug, Debug....
12)Patch, Patch, Patch....

This should give you an idea of what's required.  We *NEED* your help, as
you seem to have a grasp of shared memory and its workings.  So poke
around the sources and if you find fixes needed for the cygserver, submit
a patch to cygwin-patches mailing
list(http://cygwin.com/ml/cygwin-patches/).  Any patches to the X11 code
should be discussed on the cygwin-xfree mailing list.  Feel free to
discuss the cygserver in the main cygwin mailing list, as I'm sure Robert
would appreciate feedback.  For kde/qt specific discussions, please feel
free to discuss them on the kde-cygwin mailing list.

I hope this has given you a general idea as to the benefits and pitfalls
involved in this.  Good Luck and Happy Cygwin'ing :-).

Cheers,
Nicholas
--- "Robb, Sam" <sam.robb@timesys.com> wrote:
> Folks,
>  
> I was seeing how well the latest version of arts compiled under Cygwin,
> and noticed that the only real complaint was the lack of
> sem_getvalue()...
> so I took the dive, fetched the latest Cygwin source from CVS, and poked
> around to see what needed to be done.
>  
> With a little effort, I've managed to build a cygwin1.dll that exports
> sem_getvalue().  The version of cygwin1.dll that I built seems subtly
> hosed, though - while I can compile and run my test program from
> within a Windows cmd.exe shell, trying to run bash or ls (and probably
> a great many other things) hangs.
>  
> So, a couple of questions:
>  
> 1) What's wrong with my cygwin1.dll?  Did I miss some special magic
> I need to do in addition to adding an export to cygwin.din?
>  
> 2) Assuming that I can resolve the apparent export problem and produce
> a working cygwin1.dll, is there any interest in a patch for
> sem_getvalue()?
> Or was it left unimplemented for a reason (other than lack of
> need/time?)
>  
>   Thanks,
>  
> -Samrobb
> 


__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: sem_getvalue patch
  2002-06-07  5:32 ` Nicholas Wourms
@ 2002-06-07  6:15   ` Nicholas Wourms
  0 siblings, 0 replies; 4+ messages in thread
From: Nicholas Wourms @ 2002-06-07  6:15 UTC (permalink / raw)
  To: kde-cygwin, Robb, Sam, cygwin; +Cc: kde-cygwin

Sam,

Step 3 Should Read:

"3)Download, compile and install the latest cvs cygwin sources and patch
for cygserver support."

I also should mention that when you compile, follow the directions
specified at:

http://cygwin.com/faq/faq.html#SEC102

It is vitally important that you install to a temp directory!

Also, the install scripts have been doing some weird and annoying things
lately so you should do this after you run "make install".  Switch to the
directory "/install/i686-pc-cygwin", and run the following:

tar -cvf ../foo.tar .; cd ..; rm -fR i686-pc-cygwin; \
tar -xvf foo.tar; rm -fR foo.tar; tar --exclude=cygwin1.dll \
-cvf /usr/foo.tar .; \
cd /usr; tar -xvf foo.tar; rm -fR foo.tar

Then shutdown all cygwin processes (including cygipc which should have
already been removed).  Open explorer and copy
\path\to\cygwin\install\bin\cygwin1.dll to \path\to\cygwin\bin\ and that
is all done.

If you know how to do this already, then I apologize.  Consider this a
reference for newbies in the mailing list archives.  As for anyone else,
let it be know that I am a tar junkie, so that is why I heavily rely on
it, 'nuff said.

Cheers,
Nicholas

__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: sem_getvalue patch
@ 2002-06-07  7:55 Robb, Sam
  0 siblings, 0 replies; 4+ messages in thread
From: Robb, Sam @ 2002-06-07  7:55 UTC (permalink / raw)
  To: Nicholas Wourms, cygwin; +Cc: kde-cygwin

Nicholas & Ralf,
 
  Thanks for the information, and the encouragement.  I'm going on
vacation tomorrow, but when I get back next week, I'll see what I
can do to start digging into things.
 
-Samrobb

	-----Original Message----- 
	From: Nicholas Wourms [mailto:nwourms@yahoo.com] 
	Sent: Fri 6/7/2002 8:09 AM 
	To: Robb, Sam; cygwin@cygwin.com 
	Cc: kde-cygwin@mail.kde.org 
	Subject: Re: sem_getvalue patch
	
	

	Sam,
	
	This has been discussed in the past, but I'll fill you in.  First off,
	kde-cygwin does NOT use the native semaphores for shared memory.  These
	symbols are turned off by default when cygwin is built.  If you wish to
	use them via the native cygserver, you must patch the sources for them to
	work.  Please see:
	http://www.cygwin.com/ml/cygwin-developers/2002-03/msg00000.html
	
	Now this code is highly unstable, but I do encourage you to give it a try,
	as we need feedback on how cygserver works with kde.  Now for the hard
	part...  Kde-cygwin is compiled against the independant cygipc code, which
	also impliments SysV IPC shared memory.  You can learn more about this at:
	http://www.neuro.gatech.edu/users/cwilson/cygutils/cygipc/index.html
	
	Now here's the rub, cygipc has been deprecated in favor of the native
	cygserver.  The reason cygipc isn't being used is one of licensing, as the
	cygipc code was gleaned in part from the linux kernel and therefore cannot
	be a part of cygwin's dll (according to the license).  Even worse is the
	difference in the size of the key_t operation, where cygipc implements it
	as 32bit and cygserver uses 64bit for reasons I will not go into detail
	on.  So what does this mean?  If you enable and use cygserver, any
	binaries compiled with cygipc shm will be broken.  This includes the kde
	version of X11, QT, and KDE itself.  However, Chuck has made it quite
	clear that the original cygipc is deprecated and therefore no longer
	accepting patches.  Again, we really need someone to put cygserver through
	its routines, so here is what I suggest:
	
	1)Remove the kde X11, QT, and KDE bianaries.
	2)Remove the cygipc package (very important as it's headers confilict with
	cygserver).
	3)Download the latest cvs cygwin sources and patch for cygserver support.
	4)Start up the "cygserver &"
	4)Compile and run Roberts test suite.
	5)Assuming all goes well...
	6)Politely ask Ralf to repost his patches for the X11 server and the magic
	configuring option needed to turn on shm support in X11.
	7)Follow the instructions to obtain the X11 source, given at:
	http://xfree86.cygwin.com/docs/cg/cygwin-xfree-cg.html
	8)Add Ralf's patches and recompile X11, and assuming it compiled, install
	it.
	9)Recompile and install QT from the latest kde-cygwin cvs sources.
	10)Recompile and install kde.
	11)Debug, Debug, Debug....
	12)Patch, Patch, Patch....
	
	This should give you an idea of what's required.  We *NEED* your help, as
	you seem to have a grasp of shared memory and its workings.  So poke
	around the sources and if you find fixes needed for the cygserver, submit
	a patch to cygwin-patches mailing
	list(http://cygwin.com/ml/cygwin-patches/).  Any patches to the X11 code
	should be discussed on the cygwin-xfree mailing list.  Feel free to
	discuss the cygserver in the main cygwin mailing list, as I'm sure Robert
	would appreciate feedback.  For kde/qt specific discussions, please feel
	free to discuss them on the kde-cygwin mailing list.
	
	I hope this has given you a general idea as to the benefits and pitfalls
	involved in this.  Good Luck and Happy Cygwin'ing :-).
	
	Cheers,
	Nicholas
	--- "Robb, Sam" <sam.robb@timesys.com> wrote:
	> Folks,
	> 
	> I was seeing how well the latest version of arts compiled under Cygwin,
	> and noticed that the only real complaint was the lack of
	> sem_getvalue()...
	> so I took the dive, fetched the latest Cygwin source from CVS, and poked
	> around to see what needed to be done.
	> 
	> With a little effort, I've managed to build a cygwin1.dll that exports
	> sem_getvalue().  The version of cygwin1.dll that I built seems subtly
	> hosed, though - while I can compile and run my test program from
	> within a Windows cmd.exe shell, trying to run bash or ls (and probably
	> a great many other things) hangs.
	> 
	> So, a couple of questions:
	> 
	> 1) What's wrong with my cygwin1.dll?  Did I miss some special magic
	> I need to do in addition to adding an export to cygwin.din?
	> 
	> 2) Assuming that I can resolve the apparent export problem and produce
	> a working cygwin1.dll, is there any interest in a patch for
	> sem_getvalue()?
	> Or was it left unimplemented for a reason (other than lack of
	> need/time?)
	> 
	>   Thanks,
	> 
	> -Samrobb
	>
	
	
	__________________________________________________
	Do You Yahoo!?
	Yahoo! - Official partner of 2002 FIFA World Cup
	http://fifaworldcup.yahoo.com
	


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2002-06-07 13:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-06-07  0:25 sem_getvalue patch Robb, Sam
2002-06-07  5:32 ` Nicholas Wourms
2002-06-07  6:15   ` Nicholas Wourms
2002-06-07  7:55 Robb, Sam

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).