Project

General

Profile

Actions

Bug #14671

closed

Libraries should use -lmd instead of -lmd5

Added by Dan McDonald 2 months ago. Updated about 2 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
lib - userland libraries
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Bite-size
Tags:
Gerrit CR:

Description

Inspired by our new digs at MNX throwing a MAX_JOBS=76 at a smartos-live build, we discovered a library race where a library that used libmd5 built PRIOR to libmd5 and caused a build failure.

Since libmd5 is around for old software, and is now a filter to libmd, we should just nuke all usr/src/lib uses of -lmd5 since libmd is in the special `basedeps` target, but libmd5 is not.

See https://smartos.org/bugview/OS-8383 for the SmartOS version of this.


Files

Makefile (358 Bytes) Makefile Dan McDonald, 2022-05-09 05:09 PM
old-md5-test.c (401 Bytes) old-md5-test.c Dan McDonald, 2022-05-09 05:09 PM
Actions #1

Updated by Electric Monk 2 months ago

  • Gerrit CR set to 2137
Actions #2

Updated by Dan McDonald about 2 months ago

The libmd5 source in gate specifically states that the interfaces provided by libmd5 are now in libmd, and that libmd5 is merely a filter for old software.

Further testing done by attached Makefile and old-md5-test.c. Output is here:

smartos-build(~/14671)[0]% make
gcc -o with-libmd old-md5-test.c -lmd
gcc -o with-libmd5 old-md5-test.c -lmd5
echo "with-libmd5 check" 
with-libmd5 check
ldd ./with-libmd5
        libmd5.so.1 =>   /lib/64/libmd5.so.1
        libc.so.1 =>     /lib/64/libc.so.1
        libmd.so.1 =>    /lib/64/libmd.so.1
        libm.so.2 =>     /lib/64/libm.so.2
./with-libmd5
MD5 == 
5b40254bf34c79172a5ea537ecfeba83
echo "with-libmd check" 
with-libmd check
ldd ./with-libmd
        libmd.so.1 =>    /lib/64/libmd.so.1
        libc.so.1 =>     /lib/64/libc.so.1
        libm.so.2 =>     /lib/64/libm.so.2
./with-libmd
MD5 == 
5b40254bf34c79172a5ea537ecfeba83
smartos-build(~/14671)[0]% 

Actions #3

Updated by Electric Monk about 2 months ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

git commit 530a8aa611843ce1c3faf0296e774bbbcb900ac7

commit  530a8aa611843ce1c3faf0296e774bbbcb900ac7
Author: Dan McDonald <danmcd@mnx.io>
Date:   2022-05-12T02:55:25.000Z

    14671 Libraries should use -lmd instead of -lmd5
    Reviewed by: Brian Bennett <brian.bennett@mnx.io>
    Reviewed by: Richard Lowe <richlowe@richlowe.net>
    Approved by: Robert Mustacchi <rm@fingolfin.org>

Actions

Also available in: Atom PDF