FreeBSD 12.0
Doug Hardie
bc979 at lafn.org
Fri Dec 14 02:21:24 UTC 2018
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 = 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
$(CC) -shared -W1,-soname,librss.so -o librss.so rss.o
check_db: check_db.c
$(CC) -o check_db check_db.c -I/usr/local/include -L/usr/local/lib -lrss
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
More information about the freebsd-questions
mailing list