* Samba and CCC [not found] <gwdga.40343$ZW4.1086752@twister.rdc-kc.rr.com> @ 2003-03-27 4:05 ` DiskMan 2003-03-27 18:59 ` Michal Jaegermann 0 siblings, 1 reply; 9+ messages in thread From: DiskMan @ 2003-03-27 4:05 UTC (permalink / raw) I was wondering, is there a way to compile Samba using Compaq's Compiler (CCC) instead of GCC? I keep receiving the following errors: Using FLAGS = -O -fast -O4 -ev56 -Iinclude -I./include -I./ubiqx -I./smbwrapper -D_LA RGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -DLOGFILEBASE="/usr/l ocal/samba/var" -DCONFIGFILE="/usr/local/samba/lib/smb.conf" -DLMHOSTSFILE=" /usr/local/samba/lib/lmhosts" -DSWATDIR="/usr/local/samba/swat" -DSBINDIR= "/usr/local/samba/bin" -DLOCKDIR="/usr/local/samba/var/locks" -DCODEPAGEDIR= "/usr/local/samba/lib/codepages" -DDRIVERFILE="/usr/local/samba/lib/printers .def" -DBINDIR="/usr/local/samba/bin" -DPIDDIR="/usr/local/samba/var/locks" -DLIBDIR="/usr/local/samba/lib" -DHAVE_INCLUDES_H -DPASSWD_PROGRAM="/usr/bin /passwd" -DSMB_PASSWD_FILE="/usr/local/samba/private/smbpasswd" -DTDB_PASSWD _FILE="/usr/local/samba/private/smbpasswd.tdb" Using FLAGS32 = -O -fast -O4 -ev56 -Iinclude -I./include -I./ubiqx -I./smbwrapper -D_LA RGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -DLOGFILEBASE="/usr/l ocal/samba/var" -DCONFIGFILE="/usr/local/samba/lib/smb.conf" -DLMHOSTSFILE=" /usr/local/samba/lib/lmhosts" -DSWATDIR="/usr/local/samba/swat" -DSBINDIR= "/usr/local/samba/bin" -DLOCKDIR="/usr/local/samba/var/locks" -DCODEPAGEDIR= "/usr/local/samba/lib/codepages" -DDRIVERFILE="/usr/local/samba/lib/printers .def" -DBINDIR="/usr/local/samba/bin" -DPIDDIR="/usr/local/samba/var/locks" -DLIBDIR="/usr/local/samba/lib" -DHAVE_INCLUDES_H -DPASSWD_PROGRAM="/usr/bin /passwd" -DSMB_PASSWD_FILE="/usr/local/samba/private/smbpasswd" -DTDB_PASSWD _FILE="/usr/local/samba/private/smbpasswd.tdb" Using LIBS = -lcups -lnsl -ldl -lcrypt -lpopt Compiling smbd/server.c cc: Warning: /usr/include/glob.h, line 201: In this declaration, parameter 4 has a different type than specified in an earlier declaration of this function. (mismatparam) extern int glob64 __P ((__const char *__restrict __pattern, int __flags, -----------^ cc: Error: /usr/include/glob.h, line 201: In this declaration, the type of "glob64" is not compatible with the type of a previous declaration of "glob64" at line number 186 in file /usr/include/glob.h. (notcompat) extern int glob64 __P ((__const char *__restrict __pattern, int __flags, -----------^ cc: Warning: /usr/include/glob.h, line 205: In this declaration, parameter 1 has a different type than specified in an earlier declaration of this function. (mismatparam) extern void globfree64 __P ((glob64_t *__pglob)); ------------^ cc: Error: /usr/include/glob.h, line 205: In this declaration, the type of "globfree64" is not compatible with the type of a previous declaration of "globfree64" at line number 191 in file /usr/include/glob.h. (notcompat) extern void globfree64 __P ((glob64_t *__pglob)); ------------^ cc: Warning: smbd/server.c, line 450: In this statement, the referenced type of the pointer value "&rlp" is "struct rlimit", which is not compatible with "struct rlimit64". (ptrmismatch) getrlimit(RLIMIT_CORE, &rlp); ---------------------------------------^ cc: Warning: smbd/server.c, line 452: In this statement, the referenced type of the pointer value "&rlp" is "struct rlimit", which is not compatible with "const struct rlimit64". (ptrmismatch) setrlimit(RLIMIT_CORE, &rlp); ---------------------------------------^ cc: Warning: smbd/server.c, line 453: In this statement, the referenced type of the pointer value "&rlp" is "struct rlimit", which is not compatible with "struct rlimit64". (ptrmismatch) getrlimit(RLIMIT_CORE, &rlp); ---------------------------------------^ make: *** [smbd/server.o] Error 1 [root@kcnetwork source]# > ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Samba and CCC 2003-03-27 4:05 ` Samba and CCC DiskMan @ 2003-03-27 18:59 ` Michal Jaegermann 2003-03-29 4:05 ` DiskMan 0 siblings, 1 reply; 9+ messages in thread From: Michal Jaegermann @ 2003-03-27 18:59 UTC (permalink / raw) In comp.os.linux.alpha DiskMan <nobody@thewheel.com> wrote: > I was wondering, is there a way to compile Samba using Compaq's Compiler > (CCC) instead of GCC? It looks like, from what you are quoting, that a few trivial edits should be enough. > I keep receiving the following errors: .... > cc: Error: /usr/include/glob.h, line 201: In this declaration, the type of > "glob64" is not compatible with the type of a previous declaration of > "glob64" at line number 186 in file /usr/include/glob.h. (notcompat) Fire up an editor, find out why 'ccc' complains about "not compatible" (maybe some gcc extension was used? maybe ccc has standard conformance bugs?) and make it compatible. Actually this is a system header file and it looks like that either you have your sources misconfigured ('./configure' botched a job?) or you are missing some header file. If your 'glob.h' is the same as the one I have on hand then line 186 is behind #if _FILE_OFFSET_BITS != 64 || __GNUC__ < 2 so 'ccc' should not see it at all unless it has a buggy preprocessor (some versions of 'ccc' had this problem, IIRC). OTOH line 201 is behind #ifdef _LARGEFILE64_SOURCE which does not really makes sense on Alpha and also seem to contradict the previous define. Hence it looks like that you have a self-inflicted mess which likely can be untangled with a correct use of ./configure. Your compiler is pretty specific about what it does not like but without looking at the code it is hard to tell. Samba sources usually were rather portable and standard conforming. Michal ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Samba and CCC 2003-03-27 18:59 ` Michal Jaegermann @ 2003-03-29 4:05 ` DiskMan 2003-03-30 1:15 ` Michal Jaegermann 0 siblings, 1 reply; 9+ messages in thread From: DiskMan @ 2003-03-29 4:05 UTC (permalink / raw) Well I checked with Samba.org and Build.Samba.org... it doesn't compile with CCC... Thanks for your help... "Michal Jaegermann" <michal@gortel.phys.ualberta.ca> wrote in message news:b5vhm4$cmu$1@pulp.srv.ualberta.ca... > In comp.os.linux.alpha DiskMan <nobody@thewheel.com> wrote: > > I was wondering, is there a way to compile Samba using Compaq's Compiler > > (CCC) instead of GCC? > > It looks like, from what you are quoting, that a few trivial edits > should be enough. > > > I keep receiving the following errors: > .... > > cc: Error: /usr/include/glob.h, line 201: In this declaration, the type of > > "glob64" is not compatible with the type of a previous declaration of > > "glob64" at line number 186 in file /usr/include/glob.h. (notcompat) > > Fire up an editor, find out why 'ccc' complains about "not compatible" > (maybe some gcc extension was used? maybe ccc has standard conformance > bugs?) and make it compatible. Actually this is a system header file > and it looks like that either you have your sources misconfigured > ('./configure' botched a job?) or you are missing some header file. > If your 'glob.h' is the same as the one I have on hand then line 186 is > behind > #if _FILE_OFFSET_BITS != 64 || __GNUC__ < 2 > so 'ccc' should not see it at all unless it has a buggy preprocessor > (some versions of 'ccc' had this problem, IIRC). OTOH line 201 is > behind > #ifdef _LARGEFILE64_SOURCE > which does not really makes sense on Alpha and also seem to contradict > the previous define. Hence it looks like that you have a self-inflicted > mess which likely can be untangled with a correct use of ./configure. > > Your compiler is pretty specific about what it does not like but without > looking at the code it is hard to tell. Samba sources usually were > rather portable and standard conforming. > > Michal ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Samba and CCC 2003-03-29 4:05 ` DiskMan @ 2003-03-30 1:15 ` Michal Jaegermann 2003-03-30 14:16 ` DiskMan 0 siblings, 1 reply; 9+ messages in thread From: Michal Jaegermann @ 2003-03-30 1:15 UTC (permalink / raw) In comp.os.linux.alpha DiskMan <nobody@thewheel.com> wrote: > Well I checked with Samba.org and Build.Samba.org... it doesn't compile with > CCC... Sigh! We already know that it does not compile "out-of-the-box" because you already told us. > Thanks for your help... You would do better if you would follow advice to find where is your editor. As far as I can see samba compiles just fine with 'ccc' after minor adjustments. One of trivial ways to do that is to make in 'source' directory a private copy of /usr/include/glob.h and apply to it the following patch: --- /usr/include/glob.h Fri Mar 21 15:44:10 2003 +++ glob.h Sat Mar 29 17:32:35 2003 @@ -137,6 +137,7 @@ #endif } glob_t; +#undef _LARGEFILE64_SOURCE #ifdef _LARGEFILE64_SOURCE # ifdef _GNU_SOURCE struct stat64; As I wrote before there is really no point in _LARGEFILE64_SOURCE as on Alpha file offsets are 64-bit anyway. After that you can do 'CC=ccc CFLAGS="whatever" ./configure <all_configure_options_you_desire' and 'make'. There is a lot of warnings caused by DEBUG string constants, so they likely can be turned off, but other than that nothing special. Oh, I actually see also some "ptrmismatch" warnings so they could be in sources genuine bugs but this is a different question from "can I compile". Yes, you can, at least with sources as given in the current update to RH 7.2-alpha - samba-2.2.7-2.7.2.src.rpm. Most likely any other version too. I guess that the first thing can be classified as a bug in 'ccc' which should provide its own 'glob.h' instead of doing blindly #include_next <glob.h> This can be a more thorough fix on your private installation. Cleaner ways to resolve this tiny hiccup are left as an exercise to the reader. Results may even work despite these pointer problems as apparently gcc compiled binaries do not bomb although this may be a dumb luck in a memory layout. I cannot check. I do not do windows. Michal ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Samba and CCC 2003-03-30 1:15 ` Michal Jaegermann @ 2003-03-30 14:16 ` DiskMan 2003-03-30 18:18 ` Michal Jaegermann 0 siblings, 1 reply; 9+ messages in thread From: DiskMan @ 2003-03-30 14:16 UTC (permalink / raw) Na, I mean there's not work around, no configuraton error, no nothing... It simply can be done "Michal Jaegermann" <michal@gortel.phys.ualberta.ca> wrote in message news:b65geq$blu$1@pulp.srv.ualberta.ca... > In comp.os.linux.alpha DiskMan <nobody@thewheel.com> wrote: > > Well I checked with Samba.org and Build.Samba.org... it doesn't compile with > > CCC... > > Sigh! We already know that it does not compile "out-of-the-box" because > you already told us. > > > Thanks for your help... > > You would do better if you would follow advice to find where is your > editor. > > As far as I can see samba compiles just fine with 'ccc' after minor > adjustments. One of trivial ways to do that is to make in 'source' > directory a private copy of /usr/include/glob.h and apply to it > the following patch: > > --- /usr/include/glob.h Fri Mar 21 15:44:10 2003 > +++ glob.h Sat Mar 29 17:32:35 2003 > @@ -137,6 +137,7 @@ > #endif > } glob_t; > > +#undef _LARGEFILE64_SOURCE > #ifdef _LARGEFILE64_SOURCE > # ifdef _GNU_SOURCE > struct stat64; > > As I wrote before there is really no point in _LARGEFILE64_SOURCE > as on Alpha file offsets are 64-bit anyway. > > After that you can do > 'CC=ccc CFLAGS="whatever" ./configure <all_configure_options_you_desire' > and 'make'. There is a lot of warnings caused by DEBUG string > constants, so they likely can be turned off, but other than that nothing > special. Oh, I actually see also some "ptrmismatch" warnings so they > could be in sources genuine bugs but this is a different question from > "can I compile". Yes, you can, at least with sources as given > in the current update to RH 7.2-alpha - samba-2.2.7-2.7.2.src.rpm. > Most likely any other version too. > > I guess that the first thing can be classified as a bug in 'ccc' which > should provide its own 'glob.h' instead of doing blindly > #include_next <glob.h> > This can be a more thorough fix on your private installation. > > Cleaner ways to resolve this tiny hiccup are left as an exercise > to the reader. Results may even work despite these pointer problems > as apparently gcc compiled binaries do not bomb although this may > be a dumb luck in a memory layout. I cannot check. I do not do windows. > > Michal ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Samba and CCC 2003-03-30 14:16 ` DiskMan @ 2003-03-30 18:18 ` Michal Jaegermann 2003-04-01 15:48 ` DiskMan 0 siblings, 1 reply; 9+ messages in thread From: Michal Jaegermann @ 2003-03-30 18:18 UTC (permalink / raw) In comp.os.linux.alpha DiskMan <nobody@thewheel.com> wrote: > Na, I mean there's not work around, Is the above supposed to be funny? Yesterday I gave a short recipe for a workaround. It is hard to quarrel with reality. A better, and more general, solution would be to write a decent replacement glob.h for ccc (ccc has its own set of headers which may, or may not, load system headers; try 'rpm -ql ccc | grep glob.h'). This header does not have to be as general as /usr/include/glob.h because you deal with only one architecture and one version of a compiler. > no configuraton error, no nothing... It > simply can be done Here we agree that it can be done. One line change for a quickie. I have ccc compiled samba binaries for Alpha on my disk and you can simply repeat that "feat" too. As I wrote I do not claim that they work correctly but this is an entirely different question with a possible debugging as an answer. If somebody would post numbers if recompiling samba with ccc has any real impact on a performance that would be even more interesting. Personally I would be here somewhat surprised but who knows before actual measurements. Make sure that you are comparing the same samba versions. Michal ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Samba and CCC 2003-03-30 18:18 ` Michal Jaegermann @ 2003-04-01 15:48 ` DiskMan 2003-04-01 20:49 ` Måns Rullgård 2003-04-03 5:59 ` Michal Jaegermann 0 siblings, 2 replies; 9+ messages in thread From: DiskMan @ 2003-04-01 15:48 UTC (permalink / raw) If you have a compiled binary for then send me a copy compiled with the following options/switches: #!/bin/sh CC="ccache ccc" CXX="cxx" CFLAGS="-fast -O7 -mtune=ev56" CPPFLAGS="-fast -O7 \ -I/usr/local/include/" ./configure --with-smbmount --with-msdfs \ --with-libsmbclient --with-sendfile-support --with-winbind \ --with-winbind-auth-challenge --with-automount --with-pam_smbpass \ --with-pam --enable-cups # ; make -s ; make install -s Hate to tell you, I'm not a programmer so 'glob.h' isn't getting edited nor hacked... Sorry, I'm a simple unix/linux user... Maybe next summer, I'll have my degree in CIS by then...Will LG PS you can email it to me at 'diskman(remove)@kc.rr.com' thanks... "Michal Jaegermann" <michal@gortel.phys.ualberta.ca> wrote in message news:b67ce1$ecu$1@pulp.srv.ualberta.ca... > In comp.os.linux.alpha DiskMan <nobody@thewheel.com> wrote: > > Na, I mean there's not work around, > > Is the above supposed to be funny? Yesterday I gave a short recipe for > a workaround. It is hard to quarrel with reality. A better, and more > general, solution would be to write a decent replacement glob.h for ccc > (ccc has its own set of headers which may, or may not, load system > headers; try 'rpm -ql ccc | grep glob.h'). This header does not have to > be as general as /usr/include/glob.h because you deal with only one > architecture and one version of a compiler. > > > no configuraton error, no nothing... It > > simply can be done > > Here we agree that it can be done. One line change for a quickie. > I have ccc compiled samba binaries for Alpha on my disk and you > can simply repeat that "feat" too. As I wrote I do not claim that > they work correctly but this is an entirely different question > with a possible debugging as an answer. > > If somebody would post numbers if recompiling samba with ccc has > any real impact on a performance that would be even more interesting. > Personally I would be here somewhat surprised but who knows before > actual measurements. Make sure that you are comparing the same > samba versions. > > Michal ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Samba and CCC 2003-04-01 15:48 ` DiskMan @ 2003-04-01 20:49 ` Måns Rullgård 2003-04-03 5:59 ` Michal Jaegermann 1 sibling, 0 replies; 9+ messages in thread From: Måns Rullgård @ 2003-04-01 20:49 UTC (permalink / raw) " DiskMan" <nobody@thewheel.com> writes: > If you have a compiled binary for then send me a copy compiled with the > following options/switches: > > > #!/bin/sh > > CC="ccache ccc" CXX="cxx" CFLAGS="-fast -O7 -mtune=ev56" CPPFLAGS="-fast -O7 Have you read the ccc man page about -O3 vs. -O4? -O4 is the highest meaningful level. Furthermore, the optimizations enables by -O4 will actually make some code run slower than with -O3. You should try both and see which is faster. -- M�ns Rullg�rd mru@users.sf.net ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Samba and CCC 2003-04-01 15:48 ` DiskMan 2003-04-01 20:49 ` Måns Rullgård @ 2003-04-03 5:59 ` Michal Jaegermann 1 sibling, 0 replies; 9+ messages in thread From: Michal Jaegermann @ 2003-04-03 5:59 UTC (permalink / raw) In comp.os.linux.alpha DiskMan <nobody@thewheel.com> wrote: > If you have a compiled binary for then send me a copy compiled with the > following options/switches: You got a clear and quick recipe, with a patch, how to recompile things for yourself. Read it. Otherwise if you want to enquire about my consulting rates take this conversation to a private mail. Most likely I should have stop on the first hint without bothering to actually check which precise action is enough. As I wrote I do not even run samba myself but I was curious enough to find out why things are really "impossible". Michal ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2003-04-03 5:59 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <gwdga.40343$ZW4.1086752@twister.rdc-kc.rr.com>
2003-03-27 4:05 ` Samba and CCC DiskMan
2003-03-27 18:59 ` Michal Jaegermann
2003-03-29 4:05 ` DiskMan
2003-03-30 1:15 ` Michal Jaegermann
2003-03-30 14:16 ` DiskMan
2003-03-30 18:18 ` Michal Jaegermann
2003-04-01 15:48 ` DiskMan
2003-04-01 20:49 ` Måns Rullgård
2003-04-03 5:59 ` Michal Jaegermann
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox