Hi all, since last iteration, I changed libossupport name in libbrokenos, I tried to correct all the #ifdefs using proper "HAVE_*" constants, I split the code in different files, and I (hopefully) integrated OS/2 support. Thanks to all the people that contributed some feedback to the first libossuport prototype, and special thanks to Dave Yeo for testing it on OS/2 and providing a patch. Unless I screwed up something (I hope I correctly incorporated Dave Yeo's patch), libbrokenos can be compiled for OS/2 by simply editing config.mak and os_config.h. djgpp should be supported too (if the two mentioned files are filled with the proper values), and support for BeOS / haiku should be almost there (I say "almost" because I've not been able to build a proper cross-compiler, so I could not test it). mingw should work well (tested by cross-compiling from linux, and using wine to execute the resulting binary). The build and configure systems are still in a bad shape (all the files are always compiled, even if they result to be empty because of the #ifdefs, you have to hand-edit config.mak and os_config.h, etc...), but the library should be usable. usleep()'s prototype is still missing (I do not know where to put it). I did not move the *rint*() and round*() functions to libbrokenos yet (I think that can be done in a second time). How to use it: 1) download ffmpeg from svn, and apply the remove_ossupport-2.diff patch I previously posted 2) untar libbrokenos in /tmp, and edit config.mak and os_support.h 3) compile libbrokenos 4) configure ffmpeg to use libbrokenos. For mingw, I use ./configure --cross-compile --cross-prefix=i586-mingw32msvc- --enable-memalign-hack --target-os=mingw32 --extra-cflags="-I /tmp/libbrokenos" --extra-ldflags="-L /tmp/libbrokenos" --arch=x86_32 --extra-libs="-lbrokenos -lws2_32" 5) finally, build ffmpeg. If something does not work, maybe you need to tune os_config.h People willing to help can test this library on non-linux systems, and send patches. Thanks, Luca
On Thu, Jan 03, 2008 at 05:43:20PM +0100, Luca Abeni wrote:
The build and configure systems are still in a bad shape (all the files are always compiled, even if they result to be empty because of the #ifdefs, you have to hand-edit config.mak and os_config.h, etc...), but the library should be usable.
some comments: - many files are missing license headers - sys/select.h is empty ??? - you are using multiple inclusion guards that start with __, but identifiers starting with __ are reserved for the system. Diego
Hi Diego, thanks for the feedback. I'm going to incorporate it in the next version. Diego Biurrun wrote: [...]
- sys/select.h is empty ???
This is something I forgot to mention in the previous email :) The file is there for not breaking the compilation on systems not providing sys/select.h... If the system provides such header, the empty one has to be removed from libbrokenos (I am still wondering how to do this: maybe with "make install", or maybe the configure script can take care of removing unneeded headers --- suggestions are welcome). Thanks, Luca
Hi, On Jan 3, 2008 12:27 PM, Luca Abeni <lucabe72 at email.it> wrote:
Diego Biurrun wrote: [...]
- sys/select.h is empty ???
This is something I forgot to mention in the previous email :) The file is there for not breaking the compilation on systems not providing sys/select.h...
Then use "touch" to create it during configure when it's missing, similar to how .pc files are generated. Ronald
Hi all,
since last iteration, I changed libossupport name in libbrokenos, I tried to correct all the #ifdefs using proper "HAVE_*" constants, I split the code in different files, and I (hopefully) integrated OS/2 support. Thanks to all the people that contributed some feedback to the first libossuport prototype, and special thanks to Dave Yeo for testing it on OS/2 and providing a patch.
Unless I screwed up something (I hope I correctly incorporated Dave Yeo's patch), libbrokenos can be compiled for OS/2 by simply editing config.mak and os_config.h. djgpp should be supported too (if the two mentioned files are filled with the proper values), and support for BeOS / haiku should be almost there (I say "almost" because I've not been able to build a proper cross-compiler, so I could not test it).
mingw should work well (tested by cross-compiling from linux, and using wine to execute the resulting binary).
The build and configure systems are still in a bad shape (all the files are always compiled, even if they result to be empty because of the #ifdefs, you have to hand-edit config.mak and os_config.h, etc...), but the library should be usable.
usleep()'s prototype is still missing (I do not know where to put it).
I did not move the *rint*() and round*() functions to libbrokenos yet (I think that can be done in a second time).
How to use it: 1) download ffmpeg from svn, and apply the remove_ossupport-2.diff patch I previously posted 2) untar libbrokenos in /tmp, and edit config.mak and os_support.h 3) compile libbrokenos 4) configure ffmpeg to use libbrokenos. For mingw, I use ./configure --cross-compile --cross-prefix=i586-mingw32msvc- --enable-memalign-hack --target-os=mingw32 --extra-cflags="-I /tmp/libbrokenos" --extra-ldflags="-L /tmp/libbrokenos" --arch=x86_32 --extra-libs="-lbrokenos -lws2_32" 5) finally, build ffmpeg. If something does not work, maybe you need to tune os_config.h
People willing to help can test this library on non-linux systems, and send patches.
Thanks, Luca Well here is the complete patch for the changes for libbrokenos to compile here. Mostly needed to add some more headers needed to compile
On 01/03/08 08:43 am, Luca Abeni wrote: poll. Also got a parse error in getnameinfo so I looked up the freebsd manpage (http://www.freebsd.org/cgi/man.cgi?query=getnameinfo&sektion=3&apropos=0&manpath=FreeBSD+6.2-RELEASE) and changed the DWORD to size_t. Unluckily compiling FFmpeg is another matter, due to using the same header names as the system uses there are conflicts and I get various errors depending on how I arrange things. I think that any headers included with libbrokenos should have unique names. Dave
Hi Dave, first of all, thanks for testing, and for your feedback. Dave Yeo wrote: [...]
Well here is the complete patch for the changes for libbrokenos to compile here. Uhm... It looks like I did not integrate your previous feedback correctly. Sorry about that. BTW, which compiler and libc are used on OS/2? Is it possible to build a cross-compiler using them? It would allow me to test OS/2 compilation before posting the new libbrokenos version...
Also got a parse error in getnameinfo so I looked up the freebsd manpage (http://www.freebsd.org/cgi/man.cgi?query=getnameinfo&sektion=3&apropos=0&manpath=FreeBSD+6.2-RELEASE)
and changed the DWORD to size_t. Ok. I got it from some windows headers, and I did not think about DWORD... Sorry.
Unluckily compiling FFmpeg is another matter, due to using the same header names as the system uses there are conflicts and I get various errors depending on how I arrange things. What happens if you just remove from libbrokenos the headers that are already in your include directory?
I think that any headers included with libbrokenos should have unique names. Yes, this is something I forgot to mention: if a header is already provided by your compiler/libc, it should not be provided by libbrokenos (so it should be removed). I hope this will work, but I am not sure... When libbrokenos will have a configure script, it will take care of automatically selecting the proper headers based on the ones provided by the system.
[...]
diff -ru libbrokenos/lseek.c libbrokenos.os2/lseek.c --- libbrokenos/lseek.c Wed Dec 26 14:08:16 2007 +++ libbrokenos.os2/lseek.c Thu Jan 3 14:56:00 2008 @@ -1,4 +1,5 @@ #include "network.h" +#include "os_config.h"
Is this really needed? network.h should include some headers that already include os_config.h. I am integrating your other changes, and hopefully this time I'll get them right :) Thanks, Luca
On 01/04/08 05:02 am, Luca Abeni wrote:
Hi Dave,
first of all, thanks for testing, and for your feedback.
Hi Luca, likewise thanks for working on this,
Dave Yeo wrote: [...]
Well here is the complete patch for the changes for libbrokenos to compile here. Uhm... It looks like I did not integrate your previous feedback correctly. Sorry about that. BTW, which compiler and libc are used on OS/2? Is it possible to build a cross-compiler using them? It would allow me to test OS/2 compilation before posting the new libbrokenos version...
We are using GCC 3.3.5 and klibc (http://svn.netlabs.org/libc). The libc is mostly based on FreeBSD with the stack being an Aix port. Unluckily there is no cross compiler available.
Also got a parse error in getnameinfo so I looked up the freebsd manpage (http://www.freebsd.org/cgi/man.cgi?query=getnameinfo&sektion=3&apropos=0&manpath=FreeBSD+6.2-RELEASE)
and changed the DWORD to size_t. Ok. I got it from some windows headers, and I did not think about DWORD... Sorry.
Unluckily compiling FFmpeg is another matter, due to using the same header names as the system uses there are conflicts and I get various errors depending on how I arrange things. What happens if you just remove from libbrokenos the headers that are already in your include directory?
The build dies in libavformat/rtsp.c due to socklen_t not being defined. Also to build libbrokenos I had to remove the empty sys/socket.h
I think that any headers included with libbrokenos should have unique names. Yes, this is something I forgot to mention: if a header is already provided by your compiler/libc, it should not be provided by libbrokenos (so it should be removed). I hope this will work, but I am not sure... When libbrokenos will have a configure script, it will take care of automatically selecting the proper headers based on the ones provided by the system.
[...]
diff -ru libbrokenos/lseek.c libbrokenos.os2/lseek.c --- libbrokenos/lseek.c Wed Dec 26 14:08:16 2007 +++ libbrokenos.os2/lseek.c Thu Jan 3 14:56:00 2008 @@ -1,4 +1,5 @@ #include "network.h" +#include "os_config.h"
Is this really needed? network.h should include some headers that already include os_config.h.
Actually no, it is not needed.
I am integrating your other changes, and hopefully this time I'll get them right :)
Thanks, Luca
Dave
participants (4)
-
daveryeo@telus.net -
diego@biurrun.de -
lucabe72@email.it -
rsbultje@gmail.com