Menu

#172 Incorrect object files in shared libutil on darwin

v1.0_(example)
closed
nobody
None
1
2026-02-19
2024-07-30
No

The Darwin portion of this Makefile recipe:

$(LIBUTILSO): $(UOBJECTS) $(UHEADERS)
ifeq ($(UNAME), Darwin)
    $(CC) $(CFLAGS) -dynamiclib -current_version $(LIBVER) $(OBJECTS) -o $(LIBUTILSO)
else
    $(CC) $(CFLAGS) $(CPPLAGS) -shared $(LDFLAGS) -Wl,-soname -Wl,$(LIBUTILMAJOR) -o $(LIBUTILSO) $(UOBJECTS)
endif

Specifies $(OBJECTS) rather than $(UBOJECTS)

Discussion

  • Daniel Macks

    Daniel Macks - 2024-07-30

    That's solely based on the lack of sync between the two platforms and also between the linker and the dependencies list. But that fix causes FTBFS due to unresolved symbols when linking libutil.dylib:

      "_GifErrorString", referenced from:
          _PrintGifError in qprintf.o
    

    because qprintf.o is now only in libgif not libutil. If libutil is (as name suggests) utility functions and (as the Makefile behaves on all platforms) not actually install libutil publicly, should it be static-only on all platforms?

     
  • Eric S. Raymond

    Eric S. Raymond - 2026-02-19
    • status: open --> closed
     
  • Eric S. Raymond

    Eric S. Raymond - 2026-02-19

    Fix pushed,

     

Log in to post a comment.

MongoDB Logo MongoDB