Fix build errors with -DPACKAGE_BUILD=ON
Fix build errors with -DPACKAGE_BUILD=ON
Merge branch 'fix_package_build' into next