#1350 Compilation issue with --disable-manual in 7.36.0

closed-fixed
None
5
2015-02-16
2014-03-26
No

Hi,

cURL 7.36.0 fails to build when configured with the --disable-manual option:

/bin/sh ../libtool  --tag=CC   --mode=link gcc  -O2 -Wno-system-headers    -o curl curl-tool_binmode.o curl-tool_bname.o curl-tool_cb_dbg.o curl-tool_cb_hdr.o curl-tool_cb_prg.o curl-tool_cb_rea.o curl-tool_cb_see.o curl-tool_cb_wrt.o curl-tool_cfgable.o curl-tool_convert.o curl-tool_dirhie.o curl-tool_doswin.o curl-tool_easysrc.o curl-tool_formparse.o curl-tool_getparam.o curl-tool_getpass.o curl-tool_help.o curl-tool_helpers.o curl-tool_homedir.o curl-tool_hugehelp.o curl-tool_libinfo.o curl-tool_main.o curl-tool_metalink.o curl-tool_mfiles.o curl-tool_msgs.o curl-tool_operate.o curl-tool_operhlp.o curl-tool_panykey.o curl-tool_paramhlp.o curl-tool_parsecfg.o curl-tool_setopt.o curl-tool_sleep.o curl-tool_urlglob.o curl-tool_util.o curl-tool_vms.o curl-tool_writeenv.o curl-tool_writeout.o curl-tool_xattr.o ../lib/curl-strtoofft.o ../lib/curl-strdup.o ../lib/curl-rawstr.o ../lib/curl-nonblock.o ../lib/curl-warnless.o  ../lib/libcurl.la  -lz  
libtool: link: gcc -O2 -Wno-system-headers -o .libs/curl curl-tool_binmode.o curl-tool_bname.o curl-tool_cb_dbg.o curl-tool_cb_hdr.o curl-tool_cb_prg.o curl-tool_cb_rea.o curl-tool_cb_see.o curl-tool_cb_wrt.o curl-tool_cfgable.o curl-tool_convert.o curl-tool_dirhie.o curl-tool_doswin.o curl-tool_easysrc.o curl-tool_formparse.o curl-tool_getparam.o curl-tool_getpass.o curl-tool_help.o curl-tool_helpers.o curl-tool_homedir.o curl-tool_hugehelp.o curl-tool_libinfo.o curl-tool_main.o curl-tool_metalink.o curl-tool_mfiles.o curl-tool_msgs.o curl-tool_operate.o curl-tool_operhlp.o curl-tool_panykey.o curl-tool_paramhlp.o curl-tool_parsecfg.o curl-tool_setopt.o curl-tool_sleep.o curl-tool_urlglob.o curl-tool_util.o curl-tool_vms.o curl-tool_writeenv.o curl-tool_writeout.o curl-tool_xattr.o ../lib/curl-strtoofft.o ../lib/curl-strdup.o ../lib/curl-rawstr.o ../lib/curl-nonblock.o ../lib/curl-warnless.o  ../lib/.libs/libcurl.so -lz -Wl,-rpath -Wl,/usr/local/lib
curl-tool_operate.o: In function `operate':
tool_operate.c:(.text+0x3891): undefined reference to `hugehelp'
collect2: error: ld returned 1 exit status
Makefile:750: recipe for target 'curl' failed
make[2]: *** [curl] Error 1
make[2]: Leaving directory '/data/sources/curl-7.36.0/src'
Makefile:624: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory '/data/sources/curl-7.36.0/src'
Makefile:676: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1

The issue appears to be related to this commit:
https://github.com/bagder/curl/commit/0af2322bc6dec10612d33de4b100d5dbc7be739f

I believe the following fix is enough to fix it:

diff --git a/src/tool_hugehelp.h b/src/tool_hugehelp.h
index 442579e..29e5c88 100644
--- a/src/tool_hugehelp.h
+++ b/src/tool_hugehelp.h
@@ -23,6 +23,8 @@
  ***************************************************************************/
 #include "tool_setup.h"

+#ifdef USE_MANUAL
 void hugehelp(void);
+#endif /* USE_MANUAL */

 #endif /* HEADER_CURL_TOOL_HUGEHELP_H */

Best regards,

Remi Gacogne
Nuage Labs SAS

1 Attachments

Related

Bugs: #1357

Discussion

  • Remi Gacogne

    Remi Gacogne - 2014-03-26

    It looks like the submitted patch is not enough, sorry.

     
  • Daniel Stenberg

    Daniel Stenberg - 2014-03-26

    Ack, it is due to the src/tools_hugehelp.c file we ship in the archive. Remove that and re-run configure and I think it works. It did for me now...

     
  • Daniel Stenberg

    Daniel Stenberg - 2014-03-26
    • status: open --> open-confirmed
    • assigned_to: Daniel Stenberg
     
  • Daniel Stenberg

    Daniel Stenberg - 2014-03-26

    Fixed in git now with https://github.com/bagder/curl/commit/38d582ff5

    Now the src/tool_hugefile.c gets generated with the necessary #else logic for dsiabled manual builds as well! This fixes it for me.

     
  • Remi Gacogne

    Remi Gacogne - 2014-03-26

    Thank you for the quick response.

    However, it does not fix it for me because the src/tool_hugefile.c file does not get re-generated. Simply doing:

    $ tar xf curl-7.36.0.tar.bz2
    $ cd curl-7.36.0
    $ rm src/tool_hugehelp.c
    $ ./configure --disable-manual && make
    

    does work, though. Not sure how the src/tool_hugefile.c got into the release tarball since it does not seem to be in the git tree (and is removed by "make distclean"), or am I missing something?

     
  • Daniel Stenberg

    Daniel Stenberg - 2014-03-26

    I said "Remove that and re-run configure", and that's what you did and confirmed it works....

    src/tool_hugehelp.c gets generated and is included in the tarballs just to avoid people having to have the necessary infrastructure to generate it. The fix I've pushed does however make the default file have an #ifdef section so that the --disable-manual option works with that file too.

    I consider this case closed.

     
  • Remi Gacogne

    Remi Gacogne - 2014-03-27

    Hi Daniel,

    Sorry I didn't see you mentioned it was necessary to remove the file.
    I agree your commit does indeed fix this issue, thanks again.

     
  • Daniel Stenberg

    Daniel Stenberg - 2014-03-27
    • status: open-confirmed --> closed-fixed
     
  • Daniel Stenberg

    Daniel Stenberg - 2014-03-27

    Thanks for confirming. Closing this!

     
  • Tudor Florea

    Tudor Florea - 2014-05-04

    Hi Daniel,
    The following sequence still does not work:
    $ tar xf curl-7.36.0.tar.bz2
    $ cd curl-7.36.0
    $ patch -p1 < ../commit_38d582ff5.patch
    $ ./configure --disable-manual
    $ make
    Was the patch supposed to work this way?
    Or, for the curl-7.36.0 release, we should use a patch that remove the src/tool_hugehelp.c file as well?

     
  • Daniel Stenberg

    Daniel Stenberg - 2014-05-04
    1. apply patch
    2. REMOVE src/tool_hugehelp.c
    3. run configure

    The C file will then be generated with the proper code that works.

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks