Menu

#24 di 6.1.0 can't find libintl under MacPorts

6.0
closed
2025-11-05
2025-11-03
No

While updating the Portfile to version 6.1.0, I ran into a linking problem: link.txt is missing -lintl.

Hence I see

Undefined symbols for architecture arm64:
  "_libintl_setlocale", referenced from:
      _main in di.c.o
ld: symbol(s) not found for architecture arm64

cmake detects that gettext-runtime is present, but the library is never inserted into the link command.

I manually added it, right after -L/opt/local/lib and got a good build.

Discussion

  • Brad Lanam

    Brad Lanam - 2025-11-03
    • labels: --> bug, macos, libintl
    • assigned_to: Brad Lanam
     
  • Brad Lanam

    Brad Lanam - 2025-11-03

    I am able to reproduce. I have a syntax error in the CMakeList.txt file.

    bll-g7:bll$ hg diff CMakeLists.txt
    diff -r 29947e7eac91 CMakeLists.txt
    --- a/CMakeLists.txt    Mon Nov 03 07:42:19 2025 -0800
    +++ b/CMakeLists.txt    Mon Nov 03 14:45:40 2025 -0800
    @@ -835,7 +835,7 @@
       set (CMAKE_REQUIRED_LIBRARIES ${Intl_LIBRARY})
     endif()
     if (Iconv_LIBRARY AND NOT Iconv_LIBRARY STREQUAL "NOTFOUND")
    -  set (CMAKE_REQUIRED_LIBRARIES "${CMAKE_REQUIRED_LIBRARIES} ${Iconv_LIBRARY}")
    +  set (CMAKE_REQUIRED_LIBRARIES "${CMAKE_REQUIRED_LIBRARIES};${Iconv_LIBRARY}")
     endif()
     check_symbol_exists (bindtextdomain libintl.h _lib_bindtextdomain)
     check_symbol_exists (gettext libintl.h _lib_gettext)
    
     
  • Brad Lanam

    Brad Lanam - 2025-11-03

    Do you want to create a patch file for 'di'?
    I would like to wait a bit and see if any other bug reports come in.

     
  • Marius Schamschula

    I've made a patch file.
    di now links cleanly.
    I'll push this to MacPorts. I can always remove the patch when it is no longer needed.

     
  • Brad Lanam

    Brad Lanam - 2025-11-05
    • status: open --> closed
     
  • Brad Lanam

    Brad Lanam - 2025-11-05

    Fixed in 6.1.0.1.

     

Log in to post a comment.