bugWeeChat - Bugs: bug #37373, Linker unable to find libgcrypt


bug #37373: Linker unable to find libgcrypt

Submitter:  Simon <foobar23>
Submitted:  Mon 17 Sep 2012 12:45:26 PM UTC
Category:  compilation Severity:  3 - Normal
Item Group:  compile/install Status:  Fixed
Privacy:  Public Assigned to:  flashcode
Originator Name:  Open/Closed:  Closed
Release:  * 0.3.9 IRC nick: 
* Mandatory Fields

Add a New Comment (Rich Markup)

Comment Type & Canned Response:
       No canned response available


Tue 18 Sep 2012 08:08:44 AM UTC, comment #4: 

Now I am able to do a full build. Thank you!

Simon <foobar23>
Tue 18 Sep 2012 07:49:22 AM UTC, comment #3: 

The define of _XOPEN_SOURCE has been removed for OpenBSD. Please try latest git :)

Note: I removed same define in src/plugins/logger/logger.c, since according to your tests, it's not needed on OpenBSD (in Linux, the define is needed for the call to function "strptime").

Sebastien Helleu <flashcode>
Project Administrator
Tue 18 Sep 2012 07:15:32 AM UTC, comment #2: 

The linker is now able to find libgcrypt now and the irc plugins gets compiled/linked now.

Though now I have the following problem:

[ 70%] Building C object src/plugins/script/CMakeFiles/script.dir/script-repo.o
cd /usr/ports/pobj/weechat-devel-20120918/weechat-devel/src/plugins/script && /usr/bin/cc  -Dscript_EXPORTS -DHAVE_CONFIG_H -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -D_LARGE_FILES -DHAVE_GCRYPT -DHAVE_GNUTLS -DHAVE_ZLIB -DHAVE_ICONV -DWEECHAT_VERSION=\"0.3.9-rc1\" -DWEECHAT_LICENSE=\"GPL3\" -O2 -pipe   -Wall -W -Werror-implicit-function-declaration -fPIC -I/usr/local/include -I/usr/ports/pobj/weechat-devel-20120918/weechat-devel   -fPIC -o CMakeFiles/script.dir/script-repo.o   -c /usr/ports/pobj/weechat-devel-20120918/weechat-devel/src/plugins/script/script-repo.c
In file included from /usr/ports/pobj/weechat-devel-20120918/weechat-devel/src/plugins/script/script-repo.c:35:
/usr/local/include/gcrypt.h:224: error: expected declaration specifiers or '...' before 'fd_set'
/usr/local/include/gcrypt.h:224: error: expected declaration specifiers or '...' before 'fd_set'
/usr/local/include/gcrypt.h:224: error: expected declaration specifiers or '...' before 'fd_set'
*** Error code 1

The include and library paths are all there, and I was able to build a test programm using the includes from script-repo.c (and the gcrypt functions it is using). The only problem seems to be the

#define _XOPEN_SOURCE 700

This seems to prevent sys/select.h to get pulled in (where fd_set is typedef'd). Seems like a (Open)BSD specific problem.

After removing the define I'm finally able to build weechat through.

Simon <foobar23>
Mon 17 Sep 2012 02:01:17 PM UTC, comment #1: 

It should be fixed by latest commit. Please test and keep me informed.

Sebastien Helleu <flashcode>
Project Administrator
Mon 17 Sep 2012 12:45:26 PM UTC, original submission:  

I thought that this problem would be fixed with the bugfix from #37311, but it is not.

Building weechat from the latest git on OpenBSD, I get the following linker error. There was no such build problem with the 0.3.8 release and in the 0.3.9 development snapshots from ~2 months ago. I think it it got introduced by the new scripts plugin, but that could just be coincidence...

[ 31%] Built target fifo
make -f src/plugins/irc/CMakeFiles/irc.dir/build.make src/plugins/irc/CMakeFiles/irc.dir/depend
cd /usr/ports/pobj/weechat-devel-20120917/weechat-devel && /usr/local/bin/cmake -E cmake_depends "Unix Makefiles" /usr/ports/pobj/weechat-devel-20120917/weechat-devel /usr/ports/pobj/weechat-devel-20120917/weechat-devel/src/plugins/irc /usr/ports/pobj/weechat-devel-20120917/weechat-devel /usr/ports/pobj/weechat-devel-20120917/weechat-devel/src/plugins/irc /usr/ports/pobj/weechat-devel-20120917/weechat-devel/src/plugins/irc/CMakeFiles/irc.dir/DependInfo.cmake --color=
make -f src/plugins/irc/CMakeFiles/irc.dir/build.make src/plugins/irc/CMakeFiles/irc.dir/build
Linking C shared module irc.so
cd /usr/ports/pobj/weechat-devel-20120917/weechat-devel/src/plugins/irc && /usr/local/bin/cmake -E cmake_link_script CMakeFiles/irc.dir/link.txt --verbose=1
/usr/bin/cc  -fPIC -O2 -pipe   -Wall -W -Werror-implicit-function-declaration  -shared -Wl,-soname,irc.so -o irc.so CMakeFiles/irc.dir/irc.o CMakeFiles/irc.dir/irc-bar-item.o CMakeFiles/irc.dir/irc-buffer.o CMakeFiles/irc.dir/irc-channel.o CMakeFiles/irc.dir/irc-color.o CMakeFiles/irc.dir/irc-command.o CMakeFiles/irc.dir/irc-completion.o CMakeFiles/irc.dir/irc-config.o CMakeFiles/irc.dir/irc-ctcp.o CMakeFiles/irc.dir/irc-debug.o CMakeFiles/irc.dir/irc-display.o CMakeFiles/irc.dir/irc-ignore.o CMakeFiles/irc.dir/irc-info.o CMakeFiles/irc.dir/irc-input.o CMakeFiles/irc.dir/irc-message.o CMakeFiles/irc.dir/irc-mode.o CMakeFiles/irc.dir/irc-msgbuffer.o CMakeFiles/irc.dir/irc-nick.o CMakeFiles/irc.dir/irc-notify.o CMakeFiles/irc.dir/irc-protocol.o CMakeFiles/irc.dir/irc-raw.o CMakeFiles/irc.dir/irc-redirect.o CMakeFiles/irc.dir/irc-sasl.o CMakeFiles/irc.dir/irc-server.o CMakeFiles/irc.dir/irc-upgrade.o /usr/local/lib/libgnutls.so.17.1 -lgcrypt -Wl,-rpath-link,/usr/X11R6/lib:/usr/local/lib
/usr/bin/ld: cannot find -lgcrypt
collect2: ld returned 1 exit status

      • Error code 1

libgcrypt is installed in /usr/local/lib/libgcrypt.so.15.0.
The last snapshot of weechat I was able to built linked successfully against it. The /usr/local/lib path is in arguments too, so ld should be able to find it...

Please let me know if you need more infos or anything.

Simon <foobar23>


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

Attach Files:

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by flashcode (Posted a comment)
  • -email is unavailable- added by foobar23 (Submitted the item)

    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.

    Only logged-in users can vote.





    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2012-09-29 flashcode Release3.3-dev 0.3.9
    2012-09-29 flashcode Open/ClosedOpen Closed
    2012-09-18 flashcode StatusReady For Test Fixed
    2012-09-17 flashcode StatusNone Ready For Test
        Assigned toNone flashcode

    Back to the top

    Powered by Savane 3.9