Skip to content

Unable to build fvwm on FreeBSD, libiconv linking issue #1213

@afhp-2020

Description

@afhp-2020

Thanks for reporting your bug here! The following template will help with
giving as much information as possible so that it's easier to diagnose and
fix.

Upfront Information

Please provide the following information by running the command and providing
the output.

  • Fvwm3 version (run: fvwm3 --version)
    N/A. Latest git from 2025-06-13.

  • Linux distribution or BSD name/version
    FreeBSD 14.3-RELEASE

  • Platform (run: uname -sp)
    amd64

Expected Behaviour

Successful build

Actual Behaviour

Build fails early the process complaining about undefined symbols related to libiconv.

Steps to Reproduce

Extra Information

meson setup build was successful.
meson compile -C build gives the following output :

INFO: autodetecting backend as ninja
INFO: calculating backend command to run: /usr/local/bin/ninja -C /usr/home/alexisp/workbench/build/fvwm3/build
ninja: Entering directory `/usr/home/alexisp/workbench/build/fvwm3/build'
[0/1] Regenerating build files
The Meson build system
Version: 1.7.0
Source dir: /usr/home/alexisp/workbench/build/fvwm3
Build dir: /usr/home/alexisp/workbench/build/fvwm3/build
Build type: native build
Project name: fvwm3
Project version: 1.1.4
C compiler for the host machine: cc (clang 18.1.6 "FreeBSD clang version 18.1.6 (https://github.com/llvm/llvm-project.git llvmorg-18.1.6-0-g1118c2e05e67)")
C linker for the host machine: cc ld.lld 18.1.6
Host machine cpu family: x86_64
Host machine cpu: x86_64
Compiler for C supports arguments -U_FORTIFY_SOURCE: YES (cached)
Library m found: YES
Has header "fcntl.h" : YES (cached)
Has header "float.h" : YES (cached)
Has header "getopt.h" : YES (cached)
Has header "inttypes.h" : YES (cached)
Has header "limits.h" : YES (cached)
Has header "malloc.h" : YES (cached)
Has header "memory.h" : YES (cached)
Has header "stdarg.h" : YES (cached)
Has header "stdint.h" : YES (cached)
Has header "stdlib.h" : YES (cached)
Has header "string.h" : YES (cached)
Has header "strings.h" : YES (cached)
Has header "sys/select.h" : YES (cached)
Has header "sys/stat.h" : YES (cached)
Has header "sys/systeminfo.h" : NO (cached)
Has header "sys/time.h" : YES (cached)
Has header "sys/wait.h" : YES (cached)
Has header "unistd.h" : YES (cached)
Checking for function "div" : YES (cached)
Checking for function "getpwuid" : YES (cached)
Checking for function "gettimeofday" : YES (cached)
Checking for function "lstat" : YES (cached)
Checking for function "memcpy" : YES (cached)
Checking for function "memmove" : YES (cached)
Checking for function "mkfifo" : YES (cached)
Checking for function "putenv" : YES (cached)
Checking for function "setpgid" : YES (cached)
Checking for function "setpgrp" : YES (cached)
Checking for function "setvbuf" : YES (cached)
Checking for function "sigaction" : YES (cached)
Checking for function "siginterrupt" : YES (cached)
Checking for function "siglongjmp" : YES (cached)
Checking for function "sigsetjmp" : YES (cached)
Checking for function "socket" : YES (cached)
Checking for function "strchr" : YES (cached)
Checking for function "strdup" : YES (cached)
Checking for function "strstr" : YES (cached)
Checking for function "strtol" : YES (cached)
Checking for function "sysconf" : YES (cached)
Checking for function "intl" : NO (cached)
Checking for function "uname" : YES (cached)
Checking for function "wait3" : YES (cached)
Checking for function "waitpid" : YES (cached)
Dependency fontconfig found: YES 2.15.0 (cached)
Dependency ice found: YES 1.1.1 (cached)
Dependency libevent found: YES 2.1.12-stable (cached)
Dependency x11 found: YES 1.8.12 (cached)
Dependency xft found: YES 2.3.8 (cached)
Dependency xrandr found: YES 1.5.4 (cached)
Dependency xt found: YES 1.3.0 (cached)
Dependency xtrans found: YES 1.6.0 (cached)
Dependency xext found: YES 1.3.6 (cached)
Dependency xkbcommon found: YES 1.8.1 (cached)
Program python3 found: YES (/usr/local/bin/python3)
Program perl found: YES (/usr/local/bin/perl)
Program go found: NO
Dependency readline found: YES 8.2 (cached)
Checking for function "append_history" with dependency readline: YES (cached)
Program sed found: YES (/usr/bin/sed)
Dependency freetype2 found: YES 26.2.20 (cached)
Dependency fribidi found: YES 1.0.16 (cached)
Dependency iconv found: YES unknown (cached)
Checking for function "nl_langinfo" : YES (cached)
Checking if "libcharset check" with dependency iconv links: NO (cached)
Header "libcharset.h" has symbol "locale_charset" : NO (cached)
Run-time dependency intl found: NO (tried builtin and system)
Dependency libpng found: YES 1.6.48 (cached)
Dependency librsvg-2.0 found: YES 2.60.0 (cached)
Dependency cairo found: YES 1.18.2 (cached)
Dependency sm found: YES 1.2.6 (cached)
Dependency xcursor found: YES 1.2.2 (cached)
Dependency xfixes found: YES 6.0.1 (cached)
Dependency xpm found: YES 3.5.17 (cached)
Dependency xrender found: YES 0.9.12 (cached)
Program asciidoctor found: YES (/usr/local/bin/asciidoctor)
Program grep found: YES (/usr/bin/grep)
Configuring configtemp.h using configuration
Configuring config.h with command
Program msgfmt found: YES (/usr/local/bin/msgfmt)
Program msginit found: YES (/usr/local/bin/msginit)
Program msgmerge found: YES (/usr/local/bin/msgmerge)
Program xgettext found: YES (/usr/local/bin/xgettext)
Configuring Module.pm using configuration
Configuring FvwmTalk using configuration
Configuring FvwmCommandS using configuration
Configuring FvwmPerl using configuration
Configuring FvwmScript-ComExample with command
Configuring FvwmCommand using configuration
Configuring fvwm-perllib using configuration
Configuring fvwm-convert-2.6 using configuration
Configuring fvwm-menu-xlock using configuration
Configuring fvwm-menu-directory using configuration
Configuring fvwm-menu-desktop using configuration
Configuring fvwm3.desktop using configuration
Build targets in project: 61

fvwm3 1.1.4

  Directories
    prefix            : /usr/local
    bindir            : bin
    datadir           : share
    docdir            : share/doc/fvwm3
    libdir            : lib
    libexecdir        : libexec
    Module dir        : libexec/fvwm3/1.1.4

  Environment
    Build             : freebsd
    Build CPU Family  : x86_64
    Host CPU Family   : x86_64
    Cross-compiling   : false
    Build Endianness  : little
    Host Endianness   : little
    Target            : freebsd
    VCS Version       : 1.1.3-2-gf94c653b
    C Compiler        : clang
    C Compiler Version: 18.1.6
    Go Version        : N/A
    Linker            : ld.lld
    Python Path       : /usr/local/bin/python3
    Python Version    : 3.11.12
    Perl              : /usr/local/bin/perl
    Perl Version      : 5.40.2

    asciidoctor       : 2.0.23

  Documentation
    HTML pages        : NO
    Man pages         : YES

  Features
    BiDi              : YES 1.0.16
    FreeType          : YES 26.2.20
    Go Modules        : NO
    iconv             : YES
    NLS               : NO
    PNG support       : YES 1.6.48
    Session Management: YES 1.2.6
    SVG support       : YES 2.60.0
    Xcursor           : YES 1.2.2
    XFixes            : YES 6.0.1
    XPM support       : YES 3.5.17
    XRender           : YES 0.9.12
    Readline          : YES

  Dependencies
    fontconfig        : YES 2.15.0
    ice               : YES 1.1.1
    libevent          : YES 2.1.12-stable
    x11               : YES 1.8.12
    xft               : YES 2.3.8
    xrandr            : YES 1.5.4
    xt                : YES 1.3.0
    xtrans            : YES 1.6.0
    xext              : YES 1.3.6
    xkbcommon         : YES 1.8.1
    cairo             : YES 1.18.2

  User defined options
    mandoc            : true

Found ninja-1.11.1 at /usr/local/bin/ninja
Cleaning... 0 files.
[119/189] Linking target fvwm3
FAILED: fvwm3 
cc  -o fvwm3 fvwm3.p/fvwm_add_window.c.o fvwm3.p/fvwm_bindings.c.o fvwm3.p/fvwm_borders.c.o fvwm3.p/fvwm_builtins.c.o fvwm3.p/fvwm_cmdparser_old.c.o fvwm3.p/fvwm_colormaps.c.o fvwm3.p/fvwm_colorset.c.o fvwm3.p/fvwm_conditional.c.o fvwm3.p/fvwm_condrc.c.o fvwm3.p/fvwm_cursor.c.o fvwm3.p/fvwm_decorations.c.o fvwm3.p/fvwm_events.c.o fvwm3.p/fvwm_ewmh.c.o fvwm3.p/fvwm_ewmh_conf.c.o fvwm3.p/fvwm_ewmh_events.c.o fvwm3.p/fvwm_ewmh_icons.c.o fvwm3.p/fvwm_ewmh_names.c.o fvwm3.p/fvwm_execcontext.c.o fvwm3.p/fvwm_expand.c.o fvwm3.p/fvwm_focus.c.o fvwm3.p/fvwm_focus_policy.c.o fvwm3.p/fvwm_frame.c.o fvwm3.p/fvwm_functable.c.o fvwm3.p/fvwm_functable_complex.c.o fvwm3.p/fvwm_functions.c.o fvwm3.p/fvwm_fvwm3.c.o fvwm3.p/fvwm_geometry.c.o fvwm3.p/fvwm_icccm2.c.o fvwm3.p/fvwm_icons.c.o fvwm3.p/fvwm_infostore.c.o fvwm3.p/fvwm_menubindings.c.o fvwm3.p/fvwm_menucmd.c.o fvwm3.p/fvwm_menudim.c.o fvwm3.p/fvwm_menugeometry.c.o fvwm3.p/fvwm_menuitem.c.o fvwm3.p/fvwm_menus.c.o fvwm3.p/fvwm_menustyle.c.o fvwm3.p/fvwm_misc.c.o fvwm3.p/fvwm_modconf.c.o fvwm3.p/fvwm_module_interface.c.o fvwm3.p/fvwm_module_list.c.o fvwm3.p/fvwm_move_resize.c.o fvwm3.p/fvwm_placement.c.o fvwm3.p/fvwm_read.c.o fvwm3.p/fvwm_schedule.c.o fvwm3.p/fvwm_session.c.o fvwm3.p/fvwm_stack.c.o fvwm3.p/fvwm_style.c.o fvwm3.p/fvwm_update.c.o fvwm3.p/fvwm_virtual.c.o fvwm3.p/fvwm_windowlist.c.o fvwm3.p/fvwm_windowshade.c.o -Wl,--as-needed -Wl,--no-undefined -Wl,--start-group -lm -Wl,-rpath,/usr/local/lib -Wl,-rpath-link,/usr/local/lib libs/libfvwm3.a /usr/local/lib/libfontconfig.so /usr/local/lib/libfreetype.so /usr/local/lib/libICE.so /usr/local/lib/libevent.so /usr/local/lib/libX11.so /usr/local/lib/libXft.so /usr/local/lib/libXrandr.so /usr/local/lib/libXt.so /usr/local/lib/libXext.so /usr/local/lib/libxkbcommon.so /usr/local/lib/libreadline.so /usr/local/lib/libfribidi.so /usr/local/lib/libpng16.so /usr/local/lib/librsvg-2.so /usr/local/lib/libgdk_pixbuf-2.0.so /usr/local/lib/libgio-2.0.so /usr/local/lib/libcairo.so /usr/local/lib/libgobject-2.0.so /usr/local/lib/libglib-2.0.so /usr/local/lib/libintl.so /usr/local/lib/libSM.so /usr/local/lib/libXcursor.so /usr/local/lib/libXfixes.so /usr/local/lib/libXpm.so /usr/local/lib/libXrender.so -Wl,--end-group
ld: error: undefined symbol: libiconv_open
>>> referenced by Ficonv.c:237 (../libs/Ficonv.c:237)
>>>               libfvwm3.a.p/Ficonv.c.o:(convert_charsets) in archive libs/libfvwm3.a
>>> referenced by Ficonv.c:77 (../libs/Ficonv.c:77)
>>>               libfvwm3.a.p/Ficonv.c.o:(is_iconv_supported) in archive libs/libfvwm3.a
>>> referenced by Ficonv.c:78 (../libs/Ficonv.c:78)
>>>               libfvwm3.a.p/Ficonv.c.o:(is_iconv_supported) in archive libs/libfvwm3.a
>>> referenced 2 more times

ld: error: undefined symbol: libiconv
>>> referenced by Ficonv.c:279 (../libs/Ficonv.c:279)
>>>               libfvwm3.a.p/Ficonv.c.o:(convert_charsets) in archive libs/libfvwm3.a

ld: error: undefined symbol: libiconv_close
>>> referenced by Ficonv.c:341 (../libs/Ficonv.c:341)
>>>               libfvwm3.a.p/Ficonv.c.o:(convert_charsets) in archive libs/libfvwm3.a
>>> referenced by Ficonv.c:82 (../libs/Ficonv.c:82)
>>>               libfvwm3.a.p/Ficonv.c.o:(is_iconv_supported) in archive libs/libfvwm3.a
>>> referenced by Ficonv.c:84 (../libs/Ficonv.c:84)
>>>               libfvwm3.a.p/Ficonv.c.o:(is_iconv_supported) in archive libs/libfvwm3.a
>>> referenced 2 more times
cc: error: linker command failed with exit code 1 (use -v to see invocation)
[124/189] Compiling C object modules/FvwmButtons/FvwmButtons.p/FvwmButtons.c.o
ninja: build stopped: subcommand failed.

libiconv is installed :

% pkg info libiconv
libiconv-1.17_1
Name           : libiconv
Version        : 1.17_1
Installed on   : Tue Sep 10 16:00:54 2024 EDT
Origin         : converters/libiconv
Architecture   : FreeBSD:14:amd64
Prefix         : /usr/local
Categories     : converters devel
Licenses       : GPLv3
Maintainer     : [email protected]
WWW            : https://www.gnu.org/software/libiconv/
Comment        : Character set conversion library
Options        :
        DOCS           : on
        ENCODINGS      : on
Shared Libs provided:
        libcharset.so.1
        libiconv.so.2
Annotations    :
        FreeBSD_version: 1400097
        build_timestamp: 2024-09-05T01:05:02+0000
        built_by       : poudriere-git-3.4.2
        port_checkout_unclean: no
        port_git_hash  : a40e262549
        ports_top_checkout_unclean: no
        ports_top_git_hash: b9994ae187
        repo_type      : binary
        repository     : FreeBSD
Flat size      : 2.39MiB
Description    :
This library provides an iconv() implementation, for use on systems which
don't have one, or whose implementation cannot convert from/to Unicode.

It can convert from any of these encodings to any other, through Unicode
conversion. It has also some limited support for transliteration, i.e.
when a character cannot be represented in the target character set, it can
be approximated through one or several similarly looking characters.

libiconv is for you if your application needs to support multiple character
encodings, but that support lacks from your system.

See either README or website for the list of supported encodings.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:buildRelates to compiling/buildsystem of fvwmtype:bugSomething's broken!

    Type

    Projects

    Status

    To do

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions