unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Richard Shann <richard.shann@virgin.net>
To: Mark H Weaver <mhw@netris.org>
Cc: guile-user@gnu.org
Subject: Re: statically linking in srfi modules
Date: Mon, 11 Feb 2013 10:05:52 +0000	[thread overview]
Message-ID: <1360577152.2172.2010.camel@debian-box.lan> (raw)
In-Reply-To: <87sj531uc7.fsf@tines.lan>

On Sun, 2013-02-10 at 21:02 -0500, Mark H Weaver wrote:
> Richard Shann <richard.shann@virgin.net> writes:
> > On Sun, 2013-02-10 at 10:35 -0500, Mark H Weaver wrote:
> >> This is an unrelated problem, namely that './configure' is apparently
> >> unable to find a suitable POSIX regexp library.  I think you'll find
> >> that HAVE_REGCOMP is not defined in 'config.h', in which case
> >> 'make-regexp' will not be available.  Search for 'regex' and 'rxposix'
> >> in 'config.log' for details on what went wrong.
> > Thanks for the insight - I have asked on the mxe mailing list, as I
> > guess this is a problem of their make file. But in case you can help
> > here too, I deliberately triggered a failed build so that I could get at
> > the config.log file and I found this within:
> >
> > ...
> > configure:25048: checking for regex.h
> > configure:25057: result: yes
> > configure:24937: checking rxposix.h usability
> > configure:24954: i686-pc-mingw32-gcc -c -Wno-unused-but-set-variable
> > conftest.c >&5
> > conftest.c:96:21: fatal error: rxposix.h: No such file or directory
> > ...
> >
> > the resultant config.h has
> >
> > /* Define to 1 if you have the `regex' library (-lregex). */
> > /* #undef HAVE_LIBREGEX */
> >
> > which I guess means it is undefined...
> >
> > I can't seem to track down anything about rxposix.h though ...
> 
> Don't worry about rxposix.h.  We need only one of regex.h, rxposix.h, or
> rx/rxposix.h, and it doesn't matter which one.
> 
> The problem now is that ./configure was apparently unable to find out
> how to link in the 'regcomp' function.  Search for 'regcomp' in
> 'configure.in' to see the source code for the relevant tests.

configure:31896: i686-pc-mingw32-gcc -o conftest.exe
-Wno-unused-but-set-variable
-I/home/rshann/mxe/usr/i686-pc-mingw32/include  conftest.c -lgmp
-lws2_32 -lm -lltdl -lunistring -lintl -liconv >&5
/tmp/cc8nE0P9.o:conftest.c:(.text+0xc): undefined reference to `regcomp'

configure: failed program was:
| /* confdefs.h.  */
| #define PACKAGE_NAME "guile"
| #define PACKAGE_TARNAME "guile"
| #define PACKAGE_VERSION "1.8.7"
| #define PACKAGE_STRING "guile 1.8.7"
| #define PACKAGE_BUGREPORT "bug-guile@gnu.org"
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define __EXTENSIONS__ 1
| #define _ALL_SOURCE 1
| #define _GNU_SOURCE 1
| #define _POSIX_PTHREAD_SEMANTICS 1
| #define _TANDEM_SOURCE 1
| #define LT_OBJDIR ".libs/"
| #define HAVE_LIBLTDL 1
| #define SCM_WARN_DEPRECATED_DEFAULT "summary"
| #define GUILE_USE_64_CALLS 1
| #define HAVE_POSIX 1
| #define HAVE_NETWORKING 1
| #define SIZEOF_CHAR 1
| #define SIZEOF_UNSIGNED_CHAR 1
| #define SIZEOF_SHORT 2
| #define SIZEOF_UNSIGNED_SHORT 2
| #define SIZEOF_INT 4
| #define SIZEOF_UNSIGNED_INT 4
| #define SIZEOF_LONG 4
| #define SIZEOF_UNSIGNED_LONG 4
| #define SIZEOF_SIZE_T 4
| #define SIZEOF_LONG_LONG 8
| #define SIZEOF_UNSIGNED_LONG_LONG 8
| #define SIZEOF___INT64 8
| #define SIZEOF_UNSIGNED___INT64 8
| #define SIZEOF_VOID_P 4
| #define SIZEOF_INTPTR_T 4
| #define SIZEOF_UINTPTR_T 4
| #define SIZEOF_PTRDIFF_T 4
| #define SIZEOF_SIZE_T 4
| #define SIZEOF_OFF_T 4
| #define HAVE_STDINT_H 1
| #define HAVE_INTTYPES_H 1
| #define SIZEOF_INTMAX_T 8
| #define STDC_HEADERS 1
| #define TIME_WITH_SYS_TIME 1
| #define HAVE_DIRENT_H 1
| #define HAVE_COMPLEX_H 1
| #define HAVE_FENV_H 1
| #define HAVE_IO_H 1
| #define HAVE_LIMITS_H 1
| #define HAVE_MALLOC_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_PROCESS_H 1
| #define HAVE_STRING_H 1
| #define HAVE_REGEX_H 1
| #define HAVE_SYS_TIME_H 1
| #define HAVE_SYS_TIMEB_H 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_UTIME_H 1
| #define HAVE_TIME_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_UTIME_H 1
| #define HAVE_DIRECT_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_COMPLEX_DOUBLE 1
| #define socklen_t int
| #define HAVE_UNISTD_H 1
| #define uid_t int
| #define gid_t int
| #define GETGROUPS_T int
| #define RETSIGTYPE void
| #define HAVE_LIBM 1
| #define HAVE_WINSOCK2_H 1
| #define HAVE_LIBWS2_32 1
| #define HAVE_ASSERT_H 1
| #define HAVE_CEXP 1
| #define HAVE_CHSIZE 1
| #define HAVE_CLOG 1
| #define HAVE_FESETROUND 1
| #define HAVE_FTIME 1
| #define HAVE_FTRUNCATE 1
| #define HAVE_GETCWD 1
| #define HAVE_GETTIMEOFDAY 1
| #define HAVE_MKDIR 1
| #define HAVE__PIPE 1
| #define HAVE_RENAME 1
| #define HAVE_RMDIR 1
| #define HAVE_SETLOCALE 1
| #define HAVE_STRFTIME 1
| #define HAVE_STRDUP 1
| #define HAVE_SYSTEM 1
| #define HAVE_USLEEP 1
| #define HAVE_ATEXIT 1
| #define HAVE_STRCHR 1
| #define HAVE_STRCMP 1
| #define HAVE_MEMCPY 1
| #define HAVE_ISBLANK 1
| #define HAVE_STRNCASECMP 1
| #define HAVE_PTHREAD_H 1
| #define HAVE_SYS_PARAM_H 1
| #define HAVE_SYS_FILE_H 1
| #define HAVE_DECL_SETHOSTNAME 0
| #define HAVE_DECL_STRNCASECMP 1
| #define HAVE_DECL_UNSETENV 0
| #define HAVE_DECL_HSTRERROR 0
| #define HAVE_DECL_CUSERID 0
| #define HAVE_DECL_FLOCK 0
| #define HAVE_DECL_VSNPRINTF 1
| #define GUILE_I _Complex_I
| #define HAVE_USABLE_CSQRT 1
| #define HAVE_LIBGMP 1
| #define HAVE_ICONV 1
| #define ENABLE_NLS 1
| #define HAVE_GETTEXT 1
| #define HAVE_DCGETTEXT 1
| #define HAVE_DECL_STRPTIME 0
| #define HAVE_TZSET 1
| #define LOCALTIME_CACHE 1
| /* end confdefs.h.  */
| /* System header to define __stub macros and hopefully few prototypes,
|     which can conflict with char regcomp(); below.  */
| #include <assert.h>
| /* Override any gcc2 internal prototype to avoid an error.  */
| #ifdef __cplusplus
| extern "C"
| #endif
| /* We use char because int might match the return type of a gcc2
|     builtin and then its argument prototype would still apply.  */
| char regcomp();
| 
| int
| main ()
| {
| 
| /* The GNU C library defines this for functions which it implements
|     to always fail with ENOSYS.  Some functions are actually named
|     something starting with __ and the normal name is an alias.  */
| #if defined (__stub_regcomp) || defined (__stub___regcomp)
| choke me
| #else
| regcomp();
| #endif
| 
|   ;
|   return 0;
| }


I am a bit out of my depth here ... these seem to be the libraries that
could plausibly provide regcomp(), )
(by running find . -name '*regex*' -print)

./usr/i686-pc-mingw32/lib/libboost_regex-mt.a
./usr/i686-pc-mingw32/lib/libwxregexu-2.8-i686-pc-mingw32.a
./usr/i686-pc-mingw32/lib/libwxregex-2.8-i686-pc-mingw32.a
./usr/i686-pc-mingw32/lib/libboost_regex-mt-d.a

none of these appear on the link line for the regcomp test - I can't see
where it gets that set of libraries to link to...

I noticed that the invocation of the guile build was accepting the
default for regex, so I tried setting it explicitly
with --enable-regex=yes in the configure. With this I see in config.log

configure:31783: checking for main in -lregex
configure:31812: i686-pc-mingw32-gcc -o conftest.exe
-Wno-unused-but-set-variable
-I/home/rshann/mxe/usr/i686-pc-mingw32/include  conftest.c -lregex
-lgmp -lws2_32 -lm -lltdl -lunistring -lintl -liconv >&5
/home/rshann/mxe/usr/lib/gcc/i686-pc-mingw32/4.7.0/../../../../i686-pc-mingw32/bin/ld: cannot find -lregex
collect2: error: ld returned 1 exit status

That must surely be a clue, and perhaps a bug, I presume the default is
to have regex built?

Any further help will be much appreciated...

Richard

>   Search
> for 'regcomp', 'regex', and 'rx' in 'config.log' to see more detail
> about what went wrong.  Note that 'GUILE_NAMED_CHECK_FUNC' is defined in
> 'acinclude.m4'.
> 
>     Regards,
>       Mark





  reply	other threads:[~2013-02-11 10:05 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-08  9:24 statically linking in srfi modules Richard Shann
2013-02-08  9:25 ` Richard Shann
2013-02-08 11:27   ` Andy Wingo
2013-02-08 13:02     ` Richard Shann
2013-02-08 13:21       ` Richard Shann
2013-02-08 17:52     ` Richard Shann
2013-02-08 21:39       ` Mark H Weaver
2013-02-08 22:11         ` Mark H Weaver
2013-02-08 22:36           ` Richard Shann
2013-02-09 12:13           ` Richard Shann
2013-02-09 15:10             ` Mark H Weaver
2013-02-09 15:32               ` Mark H Weaver
2013-02-09 17:57                 ` Richard Shann
2013-02-10  2:00                   ` Mark H Weaver
2013-02-10 11:11                     ` Richard Shann
2013-02-10 15:35                       ` Mark H Weaver
2013-02-10 17:24                         ` Richard Shann
2013-02-11  2:02                           ` Mark H Weaver
2013-02-11 10:05                             ` Richard Shann [this message]
2013-02-11 13:07                               ` Richard Shann
2013-02-11 17:03                                 ` Mark H Weaver
2013-02-12 12:58                                   ` Richard Shann
2013-02-12 19:01                                     ` Mark H Weaver
2013-02-12 21:38                                       ` Ludovic Courtès
2013-02-09 18:52                 ` Richard Shann
2013-02-08 23:44         ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1360577152.2172.2010.camel@debian-box.lan \
    --to=richard.shann@virgin.net \
    --cc=guile-user@gnu.org \
    --cc=mhw@netris.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).