#111: jabberd-2.1.9 source distribution contain platform specifi characters and 
C
prototype mismatches
--------------------+-------------------------------------------------------
Reporter:  plmogan  |        Owner:  smoku   
    Type:  defect   |       Status:  assigned
Priority:  major    |    Component:  c2s     
 Version:  2.1.8    |   Resolution:          
Keywords:           |     Blocking:          
--------------------+-------------------------------------------------------
Comment (by plmogan):

 Replying to [comment:7 plmogan]:
 > Replying to [comment:6 smoku]:
 > > Please describe what exact changes you need to make to make it
 compile. Or a diff would be nice.
 > >
 > > (I do not have Solaris machine at hand to debug it.)

 Hello,

 Thanks for your attention to this ticket.  Below is
 what I have done to get most of the source to compile
 with the following settings:

 Before running ./configure, do the following:

 in tcsh

 setenv CPPFLAGS '-I/usr/local/include
 -I/usr/local/include/openssl
 -I/usr/local/include/mysql'
 setenv LDFLAGS '-L/usr/local/lib -R/usr/local/lib
 -L/usr/local/lib/mysql -R/usr/local/lib/mysql -s'

 As you can tell, we build and package everything we
 use. Then, follow the hints given in
 http://jabberd2.xiaoka.com/wiki/SunOSInstallation
 not only for sm, but also for c2s as well. I mentioned
 explicitly the --export-dynamic GCC specific option
 which chocks the much superior SUN Studio 11/12
 compilers, whichare also freely available to various
 flavors of Linux.

 Please note, I am not knocking on CCC. I only state a
 easily verifiable fact that SUN's free compilers
 produces simply much superior executables.  A fact
 that even Apache folks acknowledges openly in their
 doc.

 After receiving a lot errors like the following:

 make[2]: Entering directory
 `/src/network/sources/jabberd-2.1.9/c2s'
 source='c2s.c' object='c2s-c2s.o' libtool=no \
         DEPDIR=.deps depmode=none /bin/bash ../depcomp
 \
         /opt/SUNWspro/bin/cc -DHAVE_CONFIG_H -I. -I..
 -DCONFIG_DIR=\"/usr/local/etc\"
 -DLIBRARY_DIR=\"/usr/local/lib/jabberd\"
 -I/usr/local/include -I/usr/local/include/openssl
 -I/usr/local/include/mysql  -xO3 -xbuiltin
 -xdepend=yes -xprefetch=auto,explicit -xarch=v8plusa
 -xcache=16/32/1:256/64/4 -xchip=ultra2e -c -o
 c2s-c2s.o `test -f 'c2s.c' || echo './'`c2s.c
 "c2s.h", line 21: warning: invalid white space
 character in directive
 "c2s.h", line 22: warning: invalid white space
 character in directive
 "c2s.h", line 23: warning: invalid white space
 character in directive
 "c2s.h", line 25: warning: invalid white space
 character in directive
 "c2s.h", line 27: warning: invalid white space
 character in directive
 "../mio/mio.h", line 21: warning: invalid white space
 character in directive
 [... many more ...]
 I immediately became suspicious.  vi c2s/c2s.h
 immediately showed these familiar ^M \r characters.
 My conjecture is that somehow the recent Microsoft
 Windows port introduced these codes, as whoever worked
 on such ports took the original sources and edited in
 Windows environment, overlooking the need to clean up
 the end of line characters are the porting was done.

 To prevent similar accidents in the future, perhaps a
 system that emulates what Apache and PHP people have
 done in this regard would be fruitful.

 I then simply used a
 for file in *.[ch]
 do
 dos2unix -ascii -iso $file $file
 done
 in ech source directory (e.g. c2s, sm, router,
 resolver...) to clean out all files just in case.  I
 didn't check each and every file.  The above shell
 script is easy and fast.

 I still haven't got time to investigate the prototype
 mismatch problem yet.  A quick diff showed that there
 are substantial changes introduced in c2s.c from 2.1.6
 to 2.1.9.  Since 2.1.6 so far works fine for us, and
 since I am working on a pressing project now, I will
 have to do it some other time.  If someone could fix
 these mismatches before I can, I would be more than
 happy to test build. That, I can squeeze out sometime.

 Just a final reminder, for people who are curious
 about the excellent and freely available SUN Studio
 compiler suite, please see
 http://developers.sun.com/sunstudio/index.jsp

 For people who don't have a computer running Solaris
 or the freely available OpenSolaris (yes, you get
 source for this OS too), but use Linux instead, please
 see
 http://developers.sun.com/sunstudio/linux_index.html

 I have years of experience using both GCC (I still do)
 and SUN Studio compiler suite.  The later almost
 always generate bigger executables, but often much
 faster too. Given today's computers with large RAM, of
 course my preference is to build everything with SUN
 compilers.  It also has much superior online
 documentation at http://docs.sun.com/ too.

 Regards,

 --Peter

-- 
Ticket URL: <http://jabberd2.xiaoka.com/ticket/111#comment:8>
jabberd2 <http://jabberd2.xiaoka.com/>
jabberd2 project
_______________________________________________
Jabberd2 mailing list
[email protected]
http://lists.xiaoka.com/listinfo.cgi/jabberd2-xiaoka.com

Reply via email to