For people updating from ports, osg 3.4.1 won't compile. Deleting the package and installing then the new version will do it. The instruction should say to run pkg delete -f osg and portmaster graphics/osg (or portupgrade equivalent).
A commit references this bug: Author: amdmi3 Date: Wed Mar 21 14:26:53 UTC 2018 New revision: 465180 URL: https://svnweb.freebsd.org/changeset/ports/465180 Log: - Fix build in presence of older version of osg PR: 226681 Reported by: pkubaj@anongoth.pl Changes: head/graphics/osg/files/patch-CMakeLists.txt
This suggested solution is incorrect. Build should and always can be fixed to use system includes correctly (via -isystem or ordered after local includes). This should be fixed now.