Part 1: Learning that trying to build an un-ported project outside of the ports 
make system is a waste of time.  I started reading the porters handbook and was 
blown away at how nice the ports build system is.  After a few attempts, I was 
getting the prerequisites installed and starting the build of the target 
project!

Part 2: Leaning that OpenBSD does not have a wrapper for sys info.h.  In 
digging into this, I found that it is only used to get the amount of physical 
RAM to dump to a log.  That’s it.  I just commented it out for now with an 
intent to come back later and figure out the OpenBSD way to do this.

Part 3: After applying a couple other patches (OpenBSD does not have 
gzclose_w() so use gzclose() instead, and a struct that had elements for 
Windows OR linux/FreeBSD so I added Openbsd to the ifdef list), I came across 
an error that has me puzzled.  I also noticed a few things that raised a few 
questions.

When my project is built, each file has a counter in front of it (such as 
[137/242]).  Is this something from the make build system or is it something 
from the project i am building?

Also, when I got the error, I noticed that if I immediately did a ‘make build’ 
again, it would build a few more (as in, in the [x/y] counter, the y would be a 
bit smaller).  Doing this over and over would slowly decrement the number of 
remaining files to a point at which it stopped decrementing.  This makes the 
build seem… nondeterministic?  Is this just a function of a parallel build 
system that stops whenever it sees an error?

And for the main build issue I am seeing… Here is a dump from the output:

141/242] : && /usr/ports/pobj/obs-studio-17.0.0/bin/cc  -fPIC -Wall -Wextra 
-Wno-unused-function -Werror-implicit-function-declaration -Wno-missing-braces 
-Wno-missing-field-initializers -O2 -pipe -std=gnu99 -fno-strict-aliasing 
-DNDEBUG   -shared -o plugins/rtmp-services/rtmp-services.so 
plugins/rtmp-services/CMakeFiles/rtmp-services.dir/rtmp-common.c.o 
plugins/rtmp-services/CMakeFiles/rtmp-services.dir/rtmp-custom.c.o 
plugins/rtmp-services/CMakeFiles/rtmp-services.dir/rtmp-services-main.c.o 
-L/usr/ports/pobj/obs-studio-17.0.0/build-amd64/libobs  -L/usr/local/bin/../lib 
-Wl,-rpath,/usr/ports/pobj/obs-studio-17.0.0/build-amd64/libobs: 
deps/file-updater/libfile-updater.a deps/jansson/lib/libjansson.a -llibobs.so.0 
-pthread -lcurl -Wl,-rpath-link,/usr/X11R6/lib && cd 
/usr/ports/pobj/obs-studio-17.0.0/build-amd64/plugins/rtmp-services && 
/usr/local/bin/cmake -E copy 
/usr/ports/pobj/obs-studio-17.0.0/build-amd64/plugins/rtmp-services/rtmp-services.so
 
/usr/ports/pobj/obs-studio-17.0.0/build-amd64/rundir/Release/obs-plugins/64bit/rtmp-services.so
 && cd /usr/ports/pobj/obs-studio-17.0.0/build-amd64/plugins/rtmp-services && 
/usr/local/bin/cmake -E copy_directory 
/usr/ports/pobj/obs-studio-17.0.0/obs-studio-17.0.0/plugins/rtmp-services/data 
/usr/ports/pobj/obs-studio-17.0.0/build-amd64/rundir/Release/data/obs-plugins/rtmp-services
FAILED: plugins/rtmp-services/rtmp-services.so 
: && /usr/ports/pobj/obs-studio-17.0.0/bin/cc  -fPIC -Wall -Wextra 
-Wno-unused-function -Werror-implicit-function-declaration -Wno-missing-braces 
-Wno-missing-field-initializers -O2 -pipe -std=gnu99 -fno-strict-aliasing 
-DNDEBUG   -shared -o plugins/rtmp-services/rtmp-services.so 
plugins/rtmp-services/CMakeFiles/rtmp-services.dir/rtmp-common.c.o 
plugins/rtmp-services/CMakeFiles/rtmp-services.dir/rtmp-custom.c.o 
plugins/rtmp-services/CMakeFiles/rtmp-services.dir/rtmp-services-main.c.o 
-L/usr/ports/pobj/obs-studio-17.0.0/build-amd64/libobs  -L/usr/local/bin/../lib 
-Wl,-rpath,/usr/ports/pobj/obs-studio-17.0.0/build-amd64/libobs: 
deps/file-updater/libfile-updater.a deps/jansson/lib/libjansson.a -llibobs.so.0 
-pthread -lcurl -Wl,-rpath-link,/usr/X11R6/lib && cd 
/usr/ports/pobj/obs-studio-17.0.0/build-amd64/plugins/rtmp-services && 
/usr/local/bin/cmake -E copy 
/usr/ports/pobj/obs-studio-17.0.0/build-amd64/plugins/rtmp-services/rtmp-services.so
 
/usr/ports/pobj/obs-studio-17.0.0/build-amd64/rundir/Release/obs-plugins/64bit/rtmp-services.so
 && cd /usr/ports/pobj/obs-studio-17.0.0/build-amd64/plugins/rtmp-services && 
/usr/local/bin/cmake -E copy_directory 
/usr/ports/pobj/obs-studio-17.0.0/obs-studio-17.0.0/plugins/rtmp-services/data 
/usr/ports/pobj/obs-studio-17.0.0/build-amd64/rundir/Release/data/obs-plugins/rtmp-services
/usr/bin/ld: cannot find -llibobs.so.0
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.

I think the ultimate error is "/usr/bin/ld: cannot find -llibobs.so.0”.
However, the same command has 
"-L/usr/ports/pobj/obs-studio-17.0.0/build-amd64/libobs”, and a `ll` of that 
directory reveals this:

total 1908
drwxr-xr-x   3 sirjorj  sirjorj     512 Jan  8 14:52 .
drwxr-xr-x  11 sirjorj  sirjorj     512 Jan  8 14:51 ..
drwxr-xr-x   4 sirjorj  sirjorj     512 Jan  8 14:51 CMakeFiles
-rw-r--r--   1 sirjorj  sirjorj    1343 Jan  8 14:51 LibObsConfig.cmake
-rw-r--r--   1 sirjorj  sirjorj     296 Jan  8 14:51 LibObsConfigVersion.cmake
-rw-r--r--   1 sirjorj  sirjorj    2373 Jan  8 14:51 LibObsTarget.cmake
-rw-r--r--   1 sirjorj  sirjorj   28611 Jan  8 14:51 cmake_install.cmake
lrwxr-xr-x   1 sirjorj  sirjorj      11 Jan  8 14:52 libobs.so -> libobs.so.0
-rwxr-xr-x   1 sirjorj  sirjorj  906282 Jan  8 14:52 libobs.so.0

So the ‘cannon find’ file is right where it should be.  Can any of you 
experienced porters see what rookie mistake I am making?

Thanks,
Jordon



Reply via email to