Bug#545948: ptlib: FTBFS on GNU/kFreeBSD
tags 545949 fixed-upstream thanks Robert Jongbloed wrote: Done! Robert Jongbloed OPAL/OpenH323/PTLib Architect and Co-founder. -Original Message- From: Eugen Dedu [mailto:eugen.d...@pu-pm.univ-fcomte.fr] Sent: Saturday, 12 September 2009 9:18 PM To: Robert Jongbloed Cc: 'Petr Salinger'; 545...@bugs.debian.org; Craig Southeren Subject: Re: Bug#545948: ptlib: FTBFS on GNU/kFreeBSD Hi, What about applying them to the stable branch too? Eugen Robert Jongbloed wrote: I am sorry, I saw __GLIBC__ and read __GNUC__ I have applied the patch to the SVN trunk. Note that patch could not be applied to the vsdl.* files, someone else had already changed it to something else! Robert Jongbloed OPAL/OpenH323/PTLib Architect and Co-founder. -Original Message- From: Petr Salinger [mailto:petr.salin...@seznam.cz] Sent: Friday, 11 September 2009 4:02 PM To: Robert Jongbloed Cc: 'Eugen Dedu'; 545...@bugs.debian.org Subject: RE: Bug#545948: ptlib: FTBFS on GNU/kFreeBSD Hello. Eugen passed on your patches to me to be applied to PTLib, however I have some concerns about them. Now, I had fairly recently received some patches for FreeBSD that had presumably fixed PTLib to compile for him on his particular flavour of FreeBSD. Now you are asking me to add things like: +#if defined (__GLIBC__) +#define PSETPGRP() setpgrp() +#else #define PSETPGRP() setpgrp(0, 0) +#endif Which, if I am reading it correctly, will change the code the other gentleman had used simply if the GNU compiler is used. Now maybe I am wrong, but I would be VERY surprised if he was NOT using the GNU compiler. As far as I am aware the GNU compiler is used by all open source operating systems, the only people that don't are commercial entities like Sun or Microsoft. I have never really used any flavour of FreeBSD so I don't know if all this if fine, but it just doesn't look right to me. I am unwilling to make patches that I am fairly sure will break someone else's compile. If FreeBSD and kFreeBSD are sufficiently different they should probably have a different define P_KFREEBSD for example. They have same kernel (FreeBSD), same compiler (gcc), but different userspace C library (native FreeBSD/GLIBC). The __GLIBC__ signals used C-library, not compiler, the compiler defines __GNUC__. Therefore these changes will not break previous build on plain FreeBSD. From ptlib view, there are only 2 differences. 1) macro PSETPGRP 2) location of SDL.h The third change is fix of creating shared libraries, otherwise the P_SHAREDLIB is not honored at all. To reduce differences, it is possible to use on both systems #define PSETPGRP() setpgid(0, 0) http://www.opengroup.org/onlinepubs/9699919799/functions/setpgid.html http://www.freebsd.org/cgi/cvsweb.cgi/src/lib/libc/compat- 43/setpgrp.c Petr -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#545948: ptlib: FTBFS on GNU/kFreeBSD
Done! Robert Jongbloed OPAL/OpenH323/PTLib Architect and Co-founder. -Original Message- From: Eugen Dedu [mailto:eugen.d...@pu-pm.univ-fcomte.fr] Sent: Saturday, 12 September 2009 9:18 PM To: Robert Jongbloed Cc: 'Petr Salinger'; 545...@bugs.debian.org; Craig Southeren Subject: Re: Bug#545948: ptlib: FTBFS on GNU/kFreeBSD Hi, What about applying them to the stable branch too? Eugen Robert Jongbloed wrote: I am sorry, I saw __GLIBC__ and read __GNUC__ I have applied the patch to the SVN trunk. Note that patch could not be applied to the vsdl.* files, someone else had already changed it to something else! Robert Jongbloed OPAL/OpenH323/PTLib Architect and Co-founder. -Original Message- From: Petr Salinger [mailto:petr.salin...@seznam.cz] Sent: Friday, 11 September 2009 4:02 PM To: Robert Jongbloed Cc: 'Eugen Dedu'; 545...@bugs.debian.org Subject: RE: Bug#545948: ptlib: FTBFS on GNU/kFreeBSD Hello. Eugen passed on your patches to me to be applied to PTLib, however I have some concerns about them. Now, I had fairly recently received some patches for FreeBSD that had presumably fixed PTLib to compile for him on his particular flavour of FreeBSD. Now you are asking me to add things like: +#if defined (__GLIBC__) +#define PSETPGRP() setpgrp() +#else #define PSETPGRP() setpgrp(0, 0) +#endif Which, if I am reading it correctly, will change the code the other gentleman had used simply if the GNU compiler is used. Now maybe I am wrong, but I would be VERY surprised if he was NOT using the GNU compiler. As far as I am aware the GNU compiler is used by all open source operating systems, the only people that don't are commercial entities like Sun or Microsoft. I have never really used any flavour of FreeBSD so I don't know if all this if fine, but it just doesn't look right to me. I am unwilling to make patches that I am fairly sure will break someone else's compile. If FreeBSD and kFreeBSD are sufficiently different they should probably have a different define P_KFREEBSD for example. They have same kernel (FreeBSD), same compiler (gcc), but different userspace C library (native FreeBSD/GLIBC). The __GLIBC__ signals used C-library, not compiler, the compiler defines __GNUC__. Therefore these changes will not break previous build on plain FreeBSD. From ptlib view, there are only 2 differences. 1) macro PSETPGRP 2) location of SDL.h The third change is fix of creating shared libraries, otherwise the P_SHAREDLIB is not honored at all. To reduce differences, it is possible to use on both systems #define PSETPGRP() setpgid(0, 0) http://www.opengroup.org/onlinepubs/9699919799/functions/setpgid.html http://www.freebsd.org/cgi/cvsweb.cgi/src/lib/libc/compat- 43/setpgrp.c Petr -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#545948: ptlib: FTBFS on GNU/kFreeBSD
Hi, What about applying them to the stable branch too? Eugen Robert Jongbloed wrote: I am sorry, I saw __GLIBC__ and read __GNUC__ I have applied the patch to the SVN trunk. Note that patch could not be applied to the vsdl.* files, someone else had already changed it to something else! Robert Jongbloed OPAL/OpenH323/PTLib Architect and Co-founder. -Original Message- From: Petr Salinger [mailto:petr.salin...@seznam.cz] Sent: Friday, 11 September 2009 4:02 PM To: Robert Jongbloed Cc: 'Eugen Dedu'; 545...@bugs.debian.org Subject: RE: Bug#545948: ptlib: FTBFS on GNU/kFreeBSD Hello. Eugen passed on your patches to me to be applied to PTLib, however I have some concerns about them. Now, I had fairly recently received some patches for FreeBSD that had presumably fixed PTLib to compile for him on his particular flavour of FreeBSD. Now you are asking me to add things like: +#if defined (__GLIBC__) +#define PSETPGRP() setpgrp() +#else #define PSETPGRP() setpgrp(0, 0) +#endif Which, if I am reading it correctly, will change the code the other gentleman had used simply if the GNU compiler is used. Now maybe I am wrong, but I would be VERY surprised if he was NOT using the GNU compiler. As far as I am aware the GNU compiler is used by all open source operating systems, the only people that don't are commercial entities like Sun or Microsoft. I have never really used any flavour of FreeBSD so I don't know if all this if fine, but it just doesn't look right to me. I am unwilling to make patches that I am fairly sure will break someone else's compile. If FreeBSD and kFreeBSD are sufficiently different they should probably have a different define P_KFREEBSD for example. They have same kernel (FreeBSD), same compiler (gcc), but different userspace C library (native FreeBSD/GLIBC). The __GLIBC__ signals used C-library, not compiler, the compiler defines __GNUC__. Therefore these changes will not break previous build on plain FreeBSD. From ptlib view, there are only 2 differences. 1) macro PSETPGRP 2) location of SDL.h The third change is fix of creating shared libraries, otherwise the P_SHAREDLIB is not honored at all. To reduce differences, it is possible to use on both systems #define PSETPGRP() setpgid(0, 0) http://www.opengroup.org/onlinepubs/9699919799/functions/setpgid.html http://www.freebsd.org/cgi/cvsweb.cgi/src/lib/libc/compat- 43/setpgrp.c Petr -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#545948: ptlib: FTBFS on GNU/kFreeBSD
Petr Salinger wrote: Hello. Eugen passed on your patches to me to be applied to PTLib, however I have some concerns about them. Now, I had fairly recently received some patches for FreeBSD that had presumably fixed PTLib to compile for him on his particular flavour of FreeBSD. Now you are asking me to add things like: +#if defined (__GLIBC__) +#define PSETPGRP() setpgrp() +#else #define PSETPGRP() setpgrp(0, 0) +#endif Which, if I am reading it correctly, will change the code the other gentleman had used simply if the GNU compiler is used. Now maybe I am wrong, but I would be VERY surprised if he was NOT using the GNU compiler. As far as I am aware the GNU compiler is used by all open source operating systems, the only people that don't are commercial entities like Sun or Microsoft. I have never really used any flavour of FreeBSD so I don't know if all this if fine, but it just doesn't look right to me. I am unwilling to make patches that I am fairly sure will break someone else's compile. If FreeBSD and kFreeBSD are sufficiently different they should probably have a different define P_KFREEBSD for example. They have same kernel (FreeBSD), same compiler (gcc), but different userspace C library (native FreeBSD/GLIBC). The __GLIBC__ signals used C-library, not compiler, the compiler defines __GNUC__. Therefore these changes will not break previous build on plain FreeBSD. From ptlib view, there are only 2 differences. 1) macro PSETPGRP 2) location of SDL.h The third change is fix of creating shared libraries, otherwise the P_SHAREDLIB is not honored at all. To reduce differences, it is possible to use on both systems #define PSETPGRP() setpgid(0, 0) http://www.opengroup.org/onlinepubs/9699919799/functions/setpgid.html http://www.freebsd.org/cgi/cvsweb.cgi/src/lib/libc/compat-43/setpgrp.c These kind of problems should be addressed by writing a configure test that sets a #define flag, not by relying on various symbols that may, or may not, be defined by the run-time library. Craig -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#545948: ptlib: FTBFS on GNU/kFreeBSD
I am sorry, I saw __GLIBC__ and read __GNUC__ I have applied the patch to the SVN trunk. Note that patch could not be applied to the vsdl.* files, someone else had already changed it to something else! Robert Jongbloed OPAL/OpenH323/PTLib Architect and Co-founder. -Original Message- From: Petr Salinger [mailto:petr.salin...@seznam.cz] Sent: Friday, 11 September 2009 4:02 PM To: Robert Jongbloed Cc: 'Eugen Dedu'; 545...@bugs.debian.org Subject: RE: Bug#545948: ptlib: FTBFS on GNU/kFreeBSD Hello. Eugen passed on your patches to me to be applied to PTLib, however I have some concerns about them. Now, I had fairly recently received some patches for FreeBSD that had presumably fixed PTLib to compile for him on his particular flavour of FreeBSD. Now you are asking me to add things like: +#if defined (__GLIBC__) +#define PSETPGRP() setpgrp() +#else #define PSETPGRP() setpgrp(0, 0) +#endif Which, if I am reading it correctly, will change the code the other gentleman had used simply if the GNU compiler is used. Now maybe I am wrong, but I would be VERY surprised if he was NOT using the GNU compiler. As far as I am aware the GNU compiler is used by all open source operating systems, the only people that don't are commercial entities like Sun or Microsoft. I have never really used any flavour of FreeBSD so I don't know if all this if fine, but it just doesn't look right to me. I am unwilling to make patches that I am fairly sure will break someone else's compile. If FreeBSD and kFreeBSD are sufficiently different they should probably have a different define P_KFREEBSD for example. They have same kernel (FreeBSD), same compiler (gcc), but different userspace C library (native FreeBSD/GLIBC). The __GLIBC__ signals used C-library, not compiler, the compiler defines __GNUC__. Therefore these changes will not break previous build on plain FreeBSD. From ptlib view, there are only 2 differences. 1) macro PSETPGRP 2) location of SDL.h The third change is fix of creating shared libraries, otherwise the P_SHAREDLIB is not honored at all. To reduce differences, it is possible to use on both systems #define PSETPGRP() setpgid(0, 0) http://www.opengroup.org/onlinepubs/9699919799/functions/setpgid.html http://www.freebsd.org/cgi/cvsweb.cgi/src/lib/libc/compat- 43/setpgrp.c Petr -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#545948: ptlib: FTBFS on GNU/kFreeBSD
Package: ptlib Version: 2.6.4-1 Severity: important Tags: patch User: debian-...@lists.debian.org Usertags: kfreebsd Hi, the current version fails to build on GNU/kFreeBSD. It needs some tweaks for both source and packaging. Please find attached patch with tweaks. It would also be nice if you can ask upstream to include source changes. Thanks in advance Petrdiff -u ptlib-2.6.4/debian/control ptlib-2.6.4/debian/control --- ptlib-2.6.4/debian/control +++ ptlib-2.6.4/debian/control @@ -5,7 +5,9 @@ Uploaders: Mark Purcell m...@debian.org, Eugen Dedu eugen.d...@pu-pm.univ-fcomte.fr Build-Depends: debhelper (= 7), dpatch, g++ (= 2.95), autotools-dev, doxygen, pkg-config, bison, flex, unixodbc-dev, libssl-dev, libldap2-dev, libsasl2-dev, libkrb5-dev, libexpat1-dev, - libsdl1.2-dev, libasound2-dev, libdv4-dev, libv4l-dev + libsdl1.2-dev, libdv4-dev, + libv4l-dev [!kfreebsd-i386 !kfreebsd-amd64 !hurd-i386], + libasound2-dev [!kfreebsd-i386 !kfreebsd-amd64 !hurd-i386] Build-Conflicts: libpt2.6.4, libpt2.6.3, libpt2.6.2, libpt2.6.1, libpt2.4.2, libpt2.4.1, libpt2.3-beta1, libpt-1.11.2, libpt-1.11.2-ptrace, libpt-1.11.2-develop, only in patch2: unchanged: --- ptlib-2.6.4.orig/configure +++ ptlib-2.6.4/configure @@ -3828,7 +3828,7 @@ ;; - freebsd* ) OSTYPE=FreeBSD ; + freebsd*|kfreebsd* ) OSTYPE=FreeBSD ; OS_TAG=P_FREEBSD ; if test x$OSRELEASE = x; then OSRELEASE=`sysctl -n kern.osreldate` ; only in patch2: unchanged: --- ptlib-2.6.4.orig/configure.ac +++ ptlib-2.6.4/configure.ac @@ -232,7 +232,7 @@ AC_CHECK_FUNC([swab], [AC_DEFINE([USE_SYSTEM_SWAB], [], [Use system swab()] )] ) ;; - freebsd* ) OSTYPE=FreeBSD ; + freebsd*|kfreebsd*) OSTYPE=FreeBSD ; OS_TAG=P_FREEBSD ; if test x$OSRELEASE = x; then OSRELEASE=`sysctl -n kern.osreldate` ; only in patch2: unchanged: --- ptlib-2.6.4.orig/include/ptlib/unix/ptlib/pmachdep.h +++ ptlib-2.6.4/include/ptlib/unix/ptlib/pmachdep.h @@ -92,7 +92,11 @@ #define HAS_IFREQ +#if defined (__GLIBC__) +#define PSETPGRP() setpgrp() +#else #define PSETPGRP() setpgrp(0, 0) +#endif /// #elif defined(P_OPENBSD) only in patch2: unchanged: --- ptlib-2.6.4.orig/include/ptclib/vsdl.h +++ ptlib-2.6.4/include/ptclib/vsdl.h @@ -32,7 +32,7 @@ #if P_SDL #include ptlib.h -#if defined(P_FREEBSD) +#if defined(P_FREEBSD) !defined (__GLIBC__) #include SDL11/SDL.h #else #include SDL/SDL.h only in patch2: unchanged: --- ptlib-2.6.4.orig/make/unix.mak +++ ptlib-2.6.4/make/unix.mak @@ -177,6 +177,11 @@ P_USE_RANLIB := 1 #STDCCFLAGS += -DP_USE_PRAGMA # migrated to configure +ifeq ($(P_SHAREDLIB),1) +ifndef PROG +STDCCFLAGS += -fPIC -DPIC +endif # PROG +endif # P_SHAREDLIB endif # FreeBSD only in patch2: unchanged: --- ptlib-2.6.4.orig/src/ptclib/vsdl.cxx +++ ptlib-2.6.4/src/ptclib/vsdl.cxx @@ -43,7 +43,7 @@ extern C { -#if defined(P_FREEBSD) +#if defined(P_FREEBSD) !defined (__GLIBC__) #include SDL11/SDL.h #else #include SDL/SDL.h
Bug#545948: ptlib: FTBFS on GNU/kFreeBSD
Hello. Eugen passed on your patches to me to be applied to PTLib, however I have some concerns about them. Now, I had fairly recently received some patches for FreeBSD that had presumably fixed PTLib to compile for him on his particular flavour of FreeBSD. Now you are asking me to add things like: +#if defined (__GLIBC__) +#define PSETPGRP() setpgrp() +#else #define PSETPGRP() setpgrp(0, 0) +#endif Which, if I am reading it correctly, will change the code the other gentleman had used simply if the GNU compiler is used. Now maybe I am wrong, but I would be VERY surprised if he was NOT using the GNU compiler. As far as I am aware the GNU compiler is used by all open source operating systems, the only people that don't are commercial entities like Sun or Microsoft. I have never really used any flavour of FreeBSD so I don't know if all this if fine, but it just doesn't look right to me. I am unwilling to make patches that I am fairly sure will break someone else's compile. If FreeBSD and kFreeBSD are sufficiently different they should probably have a different define P_KFREEBSD for example. They have same kernel (FreeBSD), same compiler (gcc), but different userspace C library (native FreeBSD/GLIBC). The __GLIBC__ signals used C-library, not compiler, the compiler defines __GNUC__. Therefore these changes will not break previous build on plain FreeBSD. From ptlib view, there are only 2 differences. 1) macro PSETPGRP 2) location of SDL.h The third change is fix of creating shared libraries, otherwise the P_SHAREDLIB is not honored at all. To reduce differences, it is possible to use on both systems #define PSETPGRP() setpgid(0, 0) http://www.opengroup.org/onlinepubs/9699919799/functions/setpgid.html http://www.freebsd.org/cgi/cvsweb.cgi/src/lib/libc/compat-43/setpgrp.c Petr -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org