Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 13 Dec 2018 18:21:15 -0800
From:      Doug Hardie <bc979@lafn.org>
To:        freebsd-questions <freebsd-questions@freebsd.org>
Subject:   FreeBSD 12.0
Message-ID:  <B01389BA-853A-4F77-BC52-595A386B2522@mail.sermon-archive.info>

next in thread | raw e-mail | index | archive | help
Now that it is released, I setup a spare machine and installed it.  The =
installation went fine.  However, all my applications need to be =
recompiled and tested.  The first problem I encountered was that ld =
couldn't find the BIO_ symbols.  Apparently they have moved to =
libcrypto.  I found no notice of that change in UPDATING.  Adding =
lcrypto to the ld command fixed that.  However, none of the programs =
run.  They all build correctly, but immediately exit with an error:

ld-elf.so.1: Undefined symbol "sock" referenced from COPY relocation in =
/usr/local/RSS/src/check_db

These programs all compile and run on 11.0 and 11.1.  They are in =
production on 11.1.

There is a project shared library (librss) that has an integer "sock" =
defined at the top level.  It is referenced in check_db.  Here is a =
reduced version of the code:

rss.c
_____________________

#include rss.h
int sock

void initialize ()
{
	sock =3D 3;
}

_____________________

rss.h:
_____________________

extern sock
void initialize ();

_____________________

check_db.c
_____________________

#include rss.h
int main (int argc, char *argv[])
{
	initialize ();
}

_____________________

Makefile:
_____________________
rss:       rss.c rss.h
        $(CC) -fPIC -c -Wall rss.c -I/usr/local/include -L/usr/local/lib =
-lrss=20
        $(CC) -shared -W1,-soname,librss.so -o librss.so rss.o=20

check_db:       check_db.c
        $(CC) -o check_db check_db.c -I/usr/local/include =
-L/usr/local/lib -lrss=20



It is interesting that there are a number of other variables defined =
like sock.  It doesn't complain about any others, but perhaps that's the =
first one it encounters.  Has something changed with respect to global =
variables?  I find no indications of that in UPDATING.

-- Doug




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?B01389BA-853A-4F77-BC52-595A386B2522>