patchmldonkey, a multi-networks file-sharing client - Patches: patch #4883, Mac OS X: Fix for broken Apple cpp

 
 

You are not allowed to post comments on this tracker with your current authentication level.

patch #4883: Mac OS X: Fix for broken Apple cpp

Submitter:  spiralvoice <spiralvoice>
Submitted:  Tue 07 Feb 2006 12:02:36 PM UTC
   
 
Category:  Bug fixes Priority:  5 - Normal
Status:  Done Assigned to:  None
Open/Closed:  Closed

Jump to the original submission

Sat 11 Feb 2006 07:53:05 PM UTC, comment #10: 

Applied 2006/02/11

spiralvoice <spiralvoice>
Group administrator
Sat 11 Feb 2006 06:12:13 PM UTC, comment #9: 

Yooohhhaaaaaaaa :-))  it 's the good one !

Congratulation and thank you spiralvoice.

ditfau6 <ditfau6>
Sat 11 Feb 2006 03:36:47 PM UTC, comment #8: 

Updated patch, please try again

spiralvoice <spiralvoice>
Group administrator
Fri 10 Feb 2006 07:12:51 PM UTC, comment #7: 

jeu 09.02.2006 à 17:11

I applied your first methode without new results but it works when I remove directy #pragma..." in tar.ml and misc2.ml.



Configuring MLDonkey 2.7.3.CVS - SCM: 2006-Feb -9 17:35:36 completed.

Network modules:
 - eDonkey           enabled (eMule SUI enabled)
 - BitTorrent        enabled
 - FileTP (aka wget) enabled
 - Fasttrack         enabled
 - Gnutella          enabled
 - Gnutella2         enabled
 - Open Napster              disabled - currently not usable
 - Direct Connect            disabled - currently not usable
 - Soulseek                  disabled - currently not usable
 - OpenFT                    disabled - currently not usable

Core features:
 - threads           enabled
 - zlib              enabled
 - bzip2             enabled
 - iconv             enabled
 - graphical stats   enabled
   - png support     enabled
   - jpg support     enabled

Compilers:
 - Ocaml version     3.09.1
 - gcc version       3.3
 - g++ version       3.3

Now execute 'make' to start compiling. Good luck!

To compile a static code execute:     make mlnet.static
To produce a release tarball execute: make release.mlnet.static
To clean the build directory execute: make maintainerclean

Compiling CryptoPP.cc can take several minutes, on slow machines up to half an hour.
[G4:~/Documents/compile/mldonkey] guido% make depend
ocamldep    -I src/utils/cdk  -I src/daemon/chat  -I src/gtk/chat  -I src/utils/lib  -I src/utils/ocamlrss  -I src/utils/xml-light  -I src/utils/net  -I tools  -I src/daemon/common  -I src/daemon/driver  -I src/utils/mp3tagui  -I src/config/unix  -I src/networks/gnutella  -I src/networks/gnutella2  -I src/networks/fasttrack  -I src/networks/fileTP  -I src/networks/bittorrent  -I src/networks/donkey .ml .mli > .depend
(for i in src/utils/cdk src/daemon/chat src/gtk/chat src/utils/lib src/utils/ocamlrss src/utils/xml-light src/utils/net tools src/daemon/common src/daemon/driver src/utils/mp3tagui src/config/unix  src/networks/gnutella src/networks/gnutella2 src/networks/fasttrack src/networks/fileTP src/networks/bittorrent src/networks/donkey; do \
        ocamldep    -I src/utils/cdk  -I src/daemon/chat  -I src/gtk/chat  -I src/utils/lib  -I src/utils/ocamlrss  -I src/utils/xml-light  -I src/utils/net  -I tools  -I src/daemon/common  -I src/daemon/driver  -I src/utils/mp3tagui  -I src/config/unix  -I src/networks/gnutella  -I src/networks/gnutella2  -I src/networks/fasttrack  -I src/networks/fileTP  -I src/networks/bittorrent  -I src/networks/donkey $i/*.ml $i/*.mli  >> .depend; \
        ./ocamlpp.byte $i/*.mlt  >> .depend; \
done)
File "src/utils/cdk/tar.mlcpp", line 1, characters 12-25:
Syntax error
File "src/utils/lib/misc2.mlcpp", line 1, characters 12-25:
Syntax error
if test "no" = "newgui2"; then \
        make svg_converter.byte; \
fi
[G4:~/Documents/compile/mldonkey] guido% rm src/utils/cdk/tar.ml
[G4:~/Documents/compile/mldonkey] guido% rm src/utils/lib/misc2.ml
[G4:~/Documents/compile/mldonkey] guido% make depend
cpp src/utils/cdk/tar.mlcpp  > src/utils/cdk/tar.ml
cpp src/utils/lib/misc2.mlcpp  > src/utils/lib/misc2.ml
ocamldep    -I src/utils/cdk  -I src/daemon/chat  -I src/gtk/chat  -I src/utils/lib  -I src/utils/ocamlrss  -I src/utils/xml-light  -I src/utils/net  -I tools  -I src/daemon/common  -I src/daemon/driver  -I src/utils/mp3tagui  -I src/config/unix  -I src/networks/gnutella  -I src/networks/gnutella2  -I src/networks/fasttrack  -I src/networks/fileTP  -I src/networks/bittorrent  -I src/networks/donkey .ml .mli > .depend
(for i in src/utils/cdk src/daemon/chat src/gtk/chat src/utils/lib src/utils/ocamlrss src/utils/xml-light src/utils/net tools src/daemon/common src/daemon/driver src/utils/mp3tagui src/config/unix  src/networks/gnutella src/networks/gnutella2 src/networks/fasttrack src/networks/fileTP src/networks/bittorrent src/networks/donkey; do \
        ocamldep    -I src/utils/cdk  -I src/daemon/chat  -I src/gtk/chat  -I src/utils/lib  -I src/utils/ocamlrss  -I src/utils/xml-light  -I src/utils/net  -I tools  -I src/daemon/common  -I src/daemon/driver  -I src/utils/mp3tagui  -I src/config/unix  -I src/networks/gnutella  -I src/networks/gnutella2  -I src/networks/fasttrack  -I src/networks/fileTP  -I src/networks/bittorrent  -I src/networks/donkey $i/*.ml $i/*.mli  >> .depend; \
        ./ocamlpp.byte $i/*.mlt  >> .depend; \
done)
File "src/utils/cdk/tar.mlcpp", line 1, characters 12-25:
Syntax error
File "src/utils/lib/misc2.mlcpp", line 1, characters 12-25:
Syntax error
if test "no" = "newgui2"; then \
        make svg_converter.byte; \
fi

ditfau6 <ditfau6>
Fri 10 Feb 2006 06:43:46 PM UTC, comment #6: 

After "make depend":

- rm src/utils/cdk/tar.ml
- rm src/utils/lib/misc2.ml
- make depend (yes, again)

the first lines of "make depend" should call cpp with sed or grep,
if not something else is wrong. If yes, check the output files if
the first line contains "#pragma...".
If yes, you can manually remove it, call "make depend" again
which should succeed, then "make" to build MLDonkey.

spiralvoice <spiralvoice>
Group administrator
Fri 10 Feb 2006 11:06:51 AM UTC, comment #5: 

You are right spiralvoice $host it is appropriate, sorry for this inconvenient.

This little modification seem good in 'configure'.in, no !

 if [ test "$SYSTEM" = "freebsd"] || [ test "$SYSTEM" = "darwin"] || [ test "$SYSTEM" = "netbsd"]; then
+ if [ test "$SYSTEM" = "freebsd"] || [ test "$SYSTEM" = "macosx"] || [ test "$SYSTEM" = "netbsd"]; then SCM_VERSION=`$STAT -f "%Sm" ./CVS/Entries | $SED -e 's/\(.*\) \(.*\) \(.*\) \(.*\)/\4-\1-\2 \3/'`


I post my ./configure ..... and make depend

/sw/bin/autoconf-2.59
Running Autoconf (autoconf-2.59)...
Running m4 to generate Makefile...
Arguments to configure: --enable-pthread --enable-checks --enable-filetp --enable-bittorrent --disable-multinet
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking how to run the C preprocessor... gcc -E
checking build system type... powerpc-apple-darwin8.4.0
checking host system type... powerpc-apple-darwin8.4.0
checking for sed... sed
configure: checking CVS checkout date
checking for stat... stat
checking for sed... (cached) sed
checking for cut... cut
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
checking for _LARGE_FILES value needed for large files... no
checking for ranlib... ranlib
checking for gmake... no
checking for make... make
checking if make is GNU make ... yes
checking for ocamlc.opt... /Users/guido/Documents/compile/ocaml-3.09.1-10.3.9-gcc3.3/bin/ocamlc.opt
checking for ocamlc... /Users/guido/Documents/compile/ocaml-3.09.1-10.3.9-gcc3.3/bin/ocamlc.opt
checking for rpmbuild... no
checking for rpm... no
checking for wget... wget
checking for ocamlopt.opt... ocamlopt.opt
checking for ocamlopt... (cached) ocamlopt.opt
checking for ocamldep... ocamldep
checking for ocamllex.opt... ocamllex.opt
checking for ocamllex... (cached) ocamllex.opt
checking for ocamlyacc... ocamlyacc
checking for ocamldoc... ocamldoc
checking for ocamlmktop... ocamlmktop
checking for camlp4... camlp4
checking for perl... /usr/bin/perl
checking for egrep... grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for int... yes
checking size of int... 4
checking for long... yes
checking size of long... 4
checking for void *... yes
checking size of void *... 4
checking for char... yes
checking size of char... 1
checking for short... yes
checking size of short... 2
checking for float... yes
checking size of float... 4
checking for double... yes
checking size of double... 8
checking for setrlimit... yes
checking for getrlimit... yes
checking sys/utsname.h usability... yes
checking sys/utsname.h presence... yes
checking for sys/utsname.h... yes
checking arpa/inet.h usability... yes
checking arpa/inet.h presence... yes
checking for arpa/inet.h... yes
checking for sys/types.h... (cached) yes
checking for sys/time.h... yes
checking for sys/resource.h... yes
checking for netinet/in_systm.h... yes
checking for netinet/in.h... yes
checking for netinet/ip.h... yes
checking sys/poll.h usability... yes
checking sys/poll.h presence... yes
checking for sys/poll.h... yes
checking for poll... yes
checking sys/vfs.h usability... no
checking sys/vfs.h presence... no
checking for sys/vfs.h... no
checking for sys/param.h... yes
checking for sys/mount.h... yes
checking for inflate in -lz... yes
checking zlib.h usability... yes
checking zlib.h presence... yes
checking for zlib.h... yes
checking for zlibVersion in -lz... yes
checking bzlib.h usability... yes
checking bzlib.h presence... yes
checking for bzlib.h... yes
checking for BZ2_bzReadOpen in -lbz2... yes
checking for BZ2_bzlibVersion in -lbz2... yes
checking byteswap.h usability... no
checking byteswap.h presence... no
checking for byteswap.h... no
checking for ld used by GCC... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... no
checking for shared library run path origin... done
checking for iconv... yes
checking how to link with libiconv... -liconv
checking for iconv declaration...
         extern size_t iconv (iconv_t cd, const char *inbuf, size_t *inbytesleft, char *outbuf, size_t *outbytesleft);
checking for locale_charset... yes
checking for locale_charset in -lcharset... yes
checking libcharset.h usability... yes
checking libcharset.h presence... yes
checking for libcharset.h... yes
checking locale.h usability... yes
checking locale.h presence... yes
checking for locale.h... yes
configure: checking for activated networks
checking eDonkey... yes
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for g++... g++
checking eMule SUI... yes
checking BitTorrent... yes
checking FileTP... yes
checking for the pthreads library -lpthreads... no
checking whether pthreads work without any flags... yes
checking for joinable pthread attribute... PTHREAD_CREATE_JOINABLE
checking if more special flags are required for pthreads... -D_THREAD_SAFE
checking for cc_r... gcc
checking IM... yes
checking for bzip2... bzip2
checking for gzip... (cached) bzip2
checking for gdlib-config... gdlib-config
checking for libgd > 2.0.14... 2.0.33
checking for gdImageCreate in -lgd... yes
checking for png_create_read_struct  in -lpng... yes
checking for gdImagePng in -lgd... yes
checking for png support in libgd... yes
checking for png_access_version_number in -lpng... yes
checking for jpeg_CreateCompress in -ljpeg... yes
checking for gdImageJpeg in -lgd... yes
checking for jpeg support in libgd... yes
configure: creating ./config.status
config.status: creating Makefile.config
config.status: creating mldonkey.rc
config.status: creating ../src/utils/lib/autoconf.ml.new
config.status: creating ../src/utils/lib/gAutoconf.ml.new
config.status: creating ../src/networks/donkey/donkeySui.ml
config.status: creating ../src/daemon/driver/driverGraphics.ml
config.status: creating ../packages/rpm/mldonkey.spec
config.status: creating ../packages/rpm/Makefile
config.status: creating ../packages/slackware/mldonkey.options
config.status: creating ../packages/windows/mlnet.nsi
config.status: creating config.h

Building dependencies (if it blocks, try 'make depend' to see the problem)

Configuring MLDonkey 2.7.3.CVS - SCM: 2006-Feb -9 17:35:36 completed.

Network modules:
 - eDonkey           enabled (eMule SUI enabled)
 - BitTorrent        enabled
 - FileTP (aka wget) enabled
 - Fasttrack                 disabled
 - Gnutella                  disabled
 - Gnutella2                 disabled
 - Open Napster              disabled - currently not usable
 - Direct Connect            disabled - currently not usable
 - Soulseek                  disabled - currently not usable
 - OpenFT                    disabled - currently not usable

Core features:
 - threads           enabled
 - zlib              enabled
 - bzip2             enabled
 - iconv             enabled
 - graphical stats   enabled
   - png support     enabled
   - jpg support     enabled

Compilers:
 - Ocaml version     3.09.1
 - gcc version       3.3
 - g++ version       3.3

Now execute 'make' to start compiling. Good luck!

To compile a static code execute:     make mlnet.static
To produce a release tarball execute: make release.mlnet.static
To clean the build directory execute: make maintainerclean

Compiling CryptoPP.cc can take several minutes, on slow machines up to half an hour.
[G4:~/Documents/compile/mldonkey] guido% make depend
ocamldep    -I src/utils/cdk  -I src/daemon/chat  -I src/gtk/chat  -I src/utils/lib  -I src/utils/ocamlrss  -I src/utils/xml-light  -I src/utils/net  -I tools  -I src/daemon/common  -I src/daemon/driver  -I src/utils/mp3tagui  -I src/config/unix  -I src/networks/fileTP  -I src/networks/bittorrent  -I src/networks/donkey .ml .mli > .depend
(for i in src/utils/cdk src/daemon/chat src/gtk/chat src/utils/lib src/utils/ocamlrss src/utils/xml-light src/utils/net tools src/daemon/common src/daemon/driver src/utils/mp3tagui src/config/unix  src/networks/fileTP src/networks/bittorrent src/networks/donkey; do \
        ocamldep    -I src/utils/cdk  -I src/daemon/chat  -I src/gtk/chat  -I src/utils/lib  -I src/utils/ocamlrss  -I src/utils/xml-light  -I src/utils/net  -I tools  -I src/daemon/common  -I src/daemon/driver  -I src/utils/mp3tagui  -I src/config/unix  -I src/networks/fileTP  -I src/networks/bittorrent  -I src/networks/donkey $i/*.ml $i/*.mli  >> .depend; \
        ./ocamlpp.byte $i/*.mlt  >> .depend; \
done)
File "src/utils/cdk/tar.mlcpp", line 1, characters 12-25:
Syntax error
File "src/utils/lib/misc2.mlcpp", line 1, characters 12-25:
Syntax error
if test "no" = "newgui2"; then \
        make svg_converter.byte; \
fi


ditfau6 <ditfau6>
Thu 09 Feb 2006 08:16:42 PM UTC, comment #4: 

Too many things at once;-)

IMHO this is a bad idea:

-case $host in
+case "`uname -s`" in

$host is not read from your environment, but computed by configure.in: AC_CANONICAL_HOST

If you think $host is wrong for Mac OS X use this line

echo $host

between

SYSTEM=unknown
case $host in

to see which value is computed for your system.


Please post the output of the "make depend" command.

spiralvoice <spiralvoice>
Group administrator
Thu 09 Feb 2006 05:11:56 PM UTC, comment #3: 

I applied your first methode without new results but it works when I remove  directy #pragma..." in tar.ml and misc2.ml.

Some small modifications for OSX in /mldonkey/config/configure.in because $host does not seem appropriate.

Environment of my OS :

[G4:~]ditfau6% env
SHELL=/bin/tcsh
USER=ditfau6
TERM_PROGRAM=iTerm.app
TERM=vt100
PWD=/Users/ditfau6
LOGNAME=ditfau6
HOSTTYPE=powermac
VENDOR=apple
OSTYPE=darwin
MACHTYPE=powerpc
SHLVL=1
GROUP=ditfau6
HOST=G4.local

diff -x CVS -uwNr /Users/guido/Documents/compile/mldonkey/config/configure.in /Users/guido/Documents/compile/configure.in
--- /Users/guido/Documents/compile/mldonkey/config/configure.in 2006-02-09 17:42:11.000000000 +0100
+++ /Users/guido/Documents/compile/configure.in 2006-02-09 17:46:21.000000000 +0100
@@ -22,8 +22,7 @@
 OS_FILES=unix
 OS_FILES2=unix
 SYSTEM=unknown
-FIX_BROKEN_CPP=
-case $host in
+case "`uname -s`" in
   mingw)
     SYSTEM=mingw
     OS_FILES=mingw
@@ -72,7 +71,7 @@
   hppa|*hpux*)
     SYSTEM=hpux
     ;;
darwin|*rhapsody*|*macosx*)
Darwin|*rhapsody*|*macosx*)
     SYSTEM=macosx
     AC_CHECK_PROG(SED, sed, sed)
     if test "$ac_cv_prog_SED" = "sed"; then
@@ -112,7 +111,7 @@
       AC_CHECK_PROG(CUT, cut, cut)
       if test "$ac_cv_prog_CUT" = "cut"; then
         SUB_VERSION3="CVS"
-       if [ test "$SYSTEM" = "freebsd"] || [ test "$SYSTEM" = "darwin"] || [ test "$SYSTEM" = "netbsd"]; then
+      if [ test "$SYSTEM" = "freebsd"] || [ test "$SYSTEM" = "macosx"] || [ test "$SYSTEM" = "netbsd"]; then          SCM_VERSION=`$STAT -f "%Sm" ./CVS/Entries | $SED -e 's/\(.*\) \(.*\) \(.*\) \(.*\)/\4-\1-\2 \3/'`
        else
          if [ test "$SYSTEM" = "openbsd"]; then

Unfortunatly this patch does not break the bug with gcc-3.3.

ditfau6 <ditfau6>
Wed 08 Feb 2006 05:42:06 PM UTC, comment #2: 

Ok, this is going to be a bit longer:
The problem is Apples cpp C preprocessor.
It is needed to convert
   src/utils/cdk/tar.mlcpp
and
   src/utils/lib/misc2.mlcpp
into tar.ml and misc2.ml
cpp does this but it produces a first line with "#pragma..." in
tar.ml and misc2.ml which confuses Ocaml compiler.
This patch should filter that line out but apparently fails to do so.

To test:
- clean CVS checkout
- apply patch
- ./configure (it calls make depend and fails)
- rm src/utils/cdk/tar.ml
- rm src/utils/lib/misc2.ml
- make depend (yes, again)

the first lines of "make depend" should call cpp with sed or grep,
if not something else is wrong. If yes, check the output files if
the first line contains "#pragma...".
If yes, you can manually remove it, call "make depend" again
which should succeed, then "make" to build MLDonkey.

spiralvoice <spiralvoice>
Group administrator
Wed 08 Feb 2006 01:34:20 PM UTC, comment #1: 

Hi,
Sorry spiralvoice same probleme with this patch and xcode 2.2 and Gcc-3.3 !

ditfau6 <ditfau6>
Tue 07 Feb 2006 12:02:36 PM UTC, original submission:  


spiralvoice <spiralvoice>
Group administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #9547:  4883.patch added by spiralvoice (2KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

 

Follow 5 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2006-02-11 spiralvoice StatusNone Done
    Open/ClosedOpen Closed
2006-02-11 spiralvoice Attached File- Added 4883.patch, #5930
2006-02-11 spiralvoice Attached File#5901 Removed
2006-02-07 spiralvoice Attached File- Added patch.patch, #5901

Back to the top

Powered by Savane 3.13-bb6a.
Corresponding source code