Bug#191033: hugs98_98.200211-1(unstable/ia64): FTBFS: undefined reference to `main'

Ross Paterson ross@soi.city.ac.uk
Tue, 6 May 2003 13:24:01 +0100


It's a quoting bug.  Here's a patch to apply in src/unix:

--- old/aclocal.m4	2002-10-11 17:26:38.000000000 +0100
+++ aclocal.m4	2003-05-06 13:16:45.000000000 +0100
@@ -587,11 +587,11 @@
   ./conftest 2>/dev/null
   ac_result=$?
   if test $ac_result = 3; then
-    ac_cv_dll_flags=$1
+    ac_cv_dll_flags='$1'
     ac_cv_leading_underscore=no
   fi
   if test $ac_result = 4; then
-    ac_cv_dll_flags=$1
+    ac_cv_dll_flags='$1'
     ac_cv_leading_underscore=yes
   fi
 
--- old/configure.in	2002-10-31 16:10:37.000000000 +0000
+++ configure.in	2003-05-06 13:16:45.000000000 +0100
@@ -606,32 +606,32 @@
 dnl--------------------------------------------------------------------
 
 dnl Try the MS Visual C flags
-HUGS_TRY_DYNLINK("/LD")                
-HUGS_TRY_DYNLINK("/LD /ML /nologo")                
+HUGS_TRY_DYNLINK([/LD])
+HUGS_TRY_DYNLINK([/LD /ML /nologo])
 
 dnl Try the gcc flags
-HUGS_TRY_DYNLINK("-shared")            
+HUGS_TRY_DYNLINK([-shared -fPIC])
 
 dnl Try the MacOS X flags
-HUGS_TRY_DYNLINK("-bundle")        
+HUGS_TRY_DYNLINK(-bundle)
 
 dnl Try the MacOS X flags
-HUGS_TRY_DYNLINK("-bundle -lc")        
+HUGS_TRY_DYNLINK([-bundle -lc])        
 
 dnl Try the gcc flags
-dnl HUGS_TRY_DYNLINK("-shared -nostdlib")  
+dnl HUGS_TRY_DYNLINK([-shared -nostdlib])
 
 dnl Some other gcc flags
-HUGS_TRY_DYNLINK("-r")                 
+HUGS_TRY_DYNLINK(-r)
 
 dnl Some other gcc flags
-dnl HUGS_TRY_DYNLINK("-rdynamic")          
+dnl HUGS_TRY_DYNLINK(-rdynamic)
 
 dnl Try the SunOS flags
-dnl HUGS_TRY_DYNLINK("-G")                 
+dnl HUGS_TRY_DYNLINK(-G)
 
 dnl Try the HPUX flags
-dnl HUGS_TRY_DYNLINK("-Aa +z")             
+dnl HUGS_TRY_DYNLINK([-Aa +z])             
 
 AC_DEFINE_UNQUOTED(MKDLL_CMD, "${CC-cc} $ac_cv_dll_flags")
 if test "$ac_cv_leading_underscore" = "yes"; then