FYI. ---------- Forwarded message ---------- From: Frank Baird <[EMAIL PROTECTED]> Date: Sep 18, 2006 10:40 PM Subject: Re: findutils 4.2.28 compilation fails on Solaris 9 To: James Youngman <[EMAIL PROTECTED]> Cc: [EMAIL PROTECTED]
James, I have found a way to get findutils-4.2.28 to compile under Solaris 8. Why this changed from 4.2.27 apparently involves some configure voodoo which I will do my best to explain. Please forgive me if some of this seems pedantic to you, but I want to be explicit since I am copying Zube as well. First let me remind you that the error I am seeing is: gcc -g -O2 -o find find.o fstype.o parser.o pred.o tree.o util.o version.o ../lib/libfind.a ../gnulib/lib/libgnulib.a /usr/local/lib/libintl.so -lc -Wl,-rpath -Wl,/usr/local/lib parser.o: In function `insert_regex': /home/fbaird/bld/findutils-4.2.28/find/parser.c:1500: undefined reference to `re_set_syntax' /home/fbaird/bld/findutils-4.2.28/find/parser.c:1501: undefined reference to `re_compile_pattern' pred.o: In function `pred_regex': /home/fbaird/bld/findutils-4.2.28/find/pred.c:1316: undefined reference to `re_match' collect2: ld returned 1 exit status Basically, the problem is that ../gnulib/lib/libgnulib.a does not include regex.o. This regex is a "special" version which varies from the regex supplied by Solaris or even gnu regex. The first step to compilation is to edit configure.in to uncomment the line (that is, remove "dnl") gl_INCLUDED_REGEX([gnulib/lib/regex.c]) This is an autoconf macro in findutils-4.2.28/gnulib/m4/regex.m4 which apparently creates code at configure time for the regex functions. Wow. Then one must do a ./configure to generate the Makefiles, then do a make. This make will run automake and autoconf to generate a new configure (provided of course, you have automake and autoconf installed. If not, I guess you're just hosed.) It then runs this new configure with none of the options you might want, then starts to make. Even though I have the latest gettext (0.15) installed, this fails with the following error: gcc -g -O2 -o regexprops regexprops.o regextype.o ../gnulib/lib/libgnulib.a ../gnulib/lib/libgnulib.a(quotearg.o): In function `gettext_quote': /home/fbaird/bld/findutils-4.2.28/gnulib/lib/quotearg.c:168: undefined reference to `libintl_gettext' ../gnulib/lib/libgnulib.a(xalloc-die.o): In function `xalloc_die': /home/fbaird/bld/findutils-4.2.28/gnulib/lib/xalloc-die.c:38: undefined reference to `libintl_gettext' collect2: ld returned 1 exit status I'm not sure why this is happening, but quite honestly, I only need English, so I usually configure with --disable-nls anyway. So I went back and reconfigured with ./configure --disable-nls; make Same error, which is really, really odd. So make clean; make Now it works! I've not run any tests, so I'm not absolutely positive if everything's ok, but it seems to me it should be. So in trying to figure out why this happens, I compared the output of ./configure --help from the two versions and discovered that --without-included-regex don't compile regex; this is the default on systems with recent-enough versions of the GNU C Library (use with caution on other systems) is present in 4.2.27, but has been removed from 4.2.28. After looking a bit more, I realized the --with-included-regex option was removed as well. I'm not sure how recent "recent-enough" is, but I am using the latest version available to me. I am using the latest version of the gcc branch available to me (3.4.6). I cannot go to a higher version because we have been developing a custom program for three years not using 3.4.X, and it would be too risky to go to another version level. I hope that for Solaris users, you will restore the included-regex stuff. This may affect other OSes as well. Or perhaps there is some better way. Please let me know. Thanks, Frank ----- Original Message ---- From: James Youngman <[EMAIL PROTECTED]> To: Frank Baird <[EMAIL PROTECTED]> Sent: Sunday, September 17, 2006 7:11:39 AM Subject: Re: findutils 4.2.28 compilation fails on Solaris 9 On 9/15/06, Frank Baird <[EMAIL PROTECTED]> wrote:
I am having the exact same problem with Sol 8 and gcc 3.4.6. Did you ever give a fix to Zube?
No, since I have no access to Solaris. _______________________________________________ Bug-findutils mailing list Bug-findutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-findutils