Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[osg]Fix windows-dynamic/linux build. #8060

Merged
merged 22 commits into from
Feb 14, 2020

Conversation

JackBoosY
Copy link
Contributor

@JackBoosY JackBoosY commented Sep 5, 2019

This PR will fix:

  1. Dynamic build.
  2. Static build in Linux.
  3. Dependency port missing.
  4. Other errors.

Related: #7996 #8184.

Fix curl cannot link with openssl
Fix osg cannot link with libxml2

The component present3D has a dependency conflict with the component osgstaticview.
Reason:
They all require port expat, but for osgstaticview's dependent port fontconfig, the library's link order must be fontconfig->freetype->expat. Since osg's public dependency libraries is implemented using a list, the order of expat is promoted to before the fontconfig by present3D, so the osgstaticview build fails.

After a variety of attempts, fixing this issue still failed. So I disabled these two components in linux temporary.

@JackBoosY JackBoosY added info:internal This PR or Issue was filed by the vcpkg team. wip labels Sep 5, 2019
@JackBoosY
Copy link
Contributor Author

JackBoosY commented Sep 6, 2019

otl, hungarian and libxmp-lite fails to download its source.
Seems CI machine cannot connect to source website.

LLVM has copy file error, I cannot repro it on my machine.

@JackBoosY JackBoosY mentioned this pull request Sep 16, 2019
@JackBoosY JackBoosY changed the title [osg]Fix dynamic build. [osg]Fix windows-dynamic/linux build. Sep 16, 2019
@JackBoosY
Copy link
Contributor Author

Attach osgstaticviewer compile log:

/usr/bin/c++
-fPIC
-Wall
-Wparentheses
-Wno-long-long
-Wno-import
-pedantic
-Wreturn-type
-Wmissing-braces
-Wunknown-pragmas
-Wunused
-Wmaybe-uninitialized
-Wextra
-Wshadow
-Wno-misleading-indentation
-g
-D_DEBUG
-rdynamic
examples/osgstaticviewer/CMakeFiles/example_osgstaticviewer.dir/osgstaticviewer.cpp.o
-o
bin/osgstaticviewerd
lib/libOpenThreadsd.a
lib/libosgd.a
lib/libosgDBd.a
lib/libosgUtild.a
lib/libosgGAd.a
lib/libosgViewerd.a
lib/libosgTextd.a
lib/libosgdb_ived.a
lib/libosgdb_openflightd.a
lib/libosgdb_osgd.a
lib/libosgdb_rgbd.a
lib/libosgdb_deprecated_osgd.a
lib/libosgdb_deprecated_osgparticled.a
lib/libosgdb_deprecated_osganimationd.a
lib/libosgdb_deprecated_osgfxd.a
lib/libosgdb_deprecated_osgsimd.a
lib/libosgdb_deprecated_osgtextd.a
lib/libosgdb_deprecated_osgviewerd.a
lib/libosgdb_deprecated_osgshadowd.a
lib/libosgdb_deprecated_osgterraind.a
lib/libosgdb_deprecated_osgvolumed.a
lib/libosgdb_deprecated_osgwidgetd.a
lib/libosgdb_serializers_osgd.a
lib/libosgdb_serializers_osgparticled.a
lib/libosgdb_serializers_osgtextd.a
lib/libosgdb_serializers_osgterraind.a
lib/libosgdb_serializers_osganimationd.a
lib/libosgdb_serializers_osgfxd.a
lib/libosgdb_serializers_osgshadowd.a
lib/libosgdb_serializers_osgmanipulatord.a
lib/libosgdb_serializers_osgsimd.a
lib/libosgdb_serializers_osgvolumed.a
/home/vzay/work/osg/vcpkg/installed/x64-linux/debug/lib/libexpat.a
lib/libosgdb_freetyped.a
lib/libosgWidgetd.a
lib/libosgParticled.a
lib/libosgTerraind.a
lib/libosgAnimationd.a
lib/libosgFXd.a
lib/libosgShadowd.a
lib/libosgManipulatord.a
lib/libosgViewerd.a
-lX11
-lXrandr
lib/libosgSimd.a
lib/libosgVolumed.a
lib/libosgGAd.a
lib/libosgTextd.a
lib/libosgDBd.a
lib/libosgUtild.a
lib/libosgd.a
lib/libOpenThreadsd.a
-lpthread
-lm
-lrt
-ldl
-lGL
/home/vzay/work/osg/vcpkg/installed/x64-linux/debug/lib/libfontconfig.a
/home/vzay/work/osg/vcpkg/installed/x64-linux/debug/lib/libfreetyped.a
/home/vzay/work/osg/vcpkg/installed/x64-linux/debug/lib/libbz2d.a
/home/vzay/work/osg/vcpkg/installed/x64-linux/debug/lib/libpng16d.a
/home/vzay/work/osg/vcpkg/installed/x64-linux/debug/lib/libz.a

It should be:

/usr/bin/c++
-fPIC
-Wall
-Wparentheses
-Wno-long-long
-Wno-import
-pedantic
-Wreturn-type
-Wmissing-braces
-Wunknown-pragmas
-Wunused
-Wmaybe-uninitialized
-Wextra
-Wshadow
-Wno-misleading-indentation
-g
-D_DEBUG
-rdynamic
examples/osgstaticviewer/CMakeFiles/example_osgstaticviewer.dir/osgstaticviewer.cpp.o
-o
bin/osgstaticviewerd
lib/libOpenThreadsd.a
lib/libosgd.a
lib/libosgDBd.a
lib/libosgUtild.a
lib/libosgGAd.a
lib/libosgViewerd.a
lib/libosgTextd.a
lib/libosgdb_ived.a
lib/libosgdb_openflightd.a
lib/libosgdb_osgd.a
lib/libosgdb_rgbd.a
lib/libosgdb_deprecated_osgd.a
lib/libosgdb_deprecated_osgparticled.a
lib/libosgdb_deprecated_osganimationd.a
lib/libosgdb_deprecated_osgfxd.a
lib/libosgdb_deprecated_osgsimd.a
lib/libosgdb_deprecated_osgtextd.a
lib/libosgdb_deprecated_osgviewerd.a
lib/libosgdb_deprecated_osgshadowd.a
lib/libosgdb_deprecated_osgterraind.a
lib/libosgdb_deprecated_osgvolumed.a
lib/libosgdb_deprecated_osgwidgetd.a
lib/libosgdb_serializers_osgd.a
lib/libosgdb_serializers_osgparticled.a
lib/libosgdb_serializers_osgtextd.a
lib/libosgdb_serializers_osgterraind.a
lib/libosgdb_serializers_osganimationd.a
lib/libosgdb_serializers_osgfxd.a
lib/libosgdb_serializers_osgshadowd.a
lib/libosgdb_serializers_osgmanipulatord.a
lib/libosgdb_serializers_osgsimd.a
lib/libosgdb_serializers_osgvolumed.a
lib/libosgdb_freetyped.a
lib/libosgWidgetd.a
lib/libosgParticled.a
lib/libosgTerraind.a
lib/libosgAnimationd.a
lib/libosgFXd.a
lib/libosgShadowd.a
lib/libosgManipulatord.a
lib/libosgViewerd.a
-lX11
-lXrandr
lib/libosgSimd.a
lib/libosgVolumed.a
lib/libosgGAd.a
lib/libosgTextd.a
lib/libosgDBd.a
lib/libosgUtild.a
lib/libosgd.a
lib/libOpenThreadsd.a
-lpthread
-lm
-lrt
-ldl
-lGL
/home/vzay/work/osg/vcpkg/installed/x64-linux/debug/lib/libfontconfig.a
/home/vzay/work/osg/vcpkg/installed/x64-linux/debug/lib/libfreetyped.a
/home/vzay/work/osg/vcpkg/installed/x64-linux/debug/lib/libexpat.a
/home/vzay/work/osg/vcpkg/installed/x64-linux/debug/lib/libbz2d.a
/home/vzay/work/osg/vcpkg/installed/x64-linux/debug/lib/libpng16d.a
/home/vzay/work/osg/vcpkg/installed/x64-linux/debug/lib/libz.a

@ccliuyang
Copy link

osgText need fontconfg, fontconfig need expat, freetype, so ,when compiling osgText, linked fontconfig, expat, freetype, not only compile osgstaticviewer

@JackBoosY
Copy link
Contributor Author

JackBoosY commented Sep 19, 2019

@ccliuyang right, but I can't solve the link libraries order problem yet.

@JackBoosY
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@JackBoosY
Copy link
Contributor Author

@grdowns osg:x64-windows-static build success on my machine.

@JackBoosY JackBoosY marked this pull request as ready for review September 19, 2019 09:20
@JackBoosY JackBoosY removed the wip label Sep 19, 2019
@JackBoosY
Copy link
Contributor Author

@grdowns ping.

ports/osg/CONTROL Outdated Show resolved Hide resolved
@JackBoosY
Copy link
Contributor Author

@vicroms ready to merge now.

@sgarfinkel
Copy link

sgarfinkel commented Nov 12, 2019

@JackBoosY I can confirm that the OSG_USE_UTF8_FILENAME flag needs to be Off to build on OSX so I think that should also be added to the PR. I'd recommend we make Off be the default, and only turn it on for Windows builds--which I think is the only platform that actually uses UTF8 for filenames.

@dan-shaw
Copy link
Contributor

/azp run

@dan-shaw
Copy link
Contributor

LGTM, waiting for mac CI

@dan-shaw dan-shaw assigned dan-shaw and unassigned grdowns Dec 11, 2019
@JackBoosY
Copy link
Contributor Author

@CJCombrink Good idea, but it will take more time. This PR life is too long.

@JackBoosY
Copy link
Contributor Author

JackBoosY commented Dec 13, 2019

Will fix osg-qt:x64-windows-static osgearth:x64-windows-static osgearth:x64-linux in other PR.

p.s. osgearth is missing the dependencies to link against openssl, dl, fondconfig, expat, freetype, libpng, zlib, libbz2.

@JackBoosY
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Pull request contains merge conflicts.

@PhoebeHui PhoebeHui self-assigned this Jan 14, 2020
@JackBoosY JackBoosY removed the info:reviewed Pull Request changes follow basic guidelines label Feb 4, 2020
@JackBoosY JackBoosY added the info:reviewed Pull Request changes follow basic guidelines label Feb 6, 2020
@ras0219-msft ras0219-msft merged commit ad69a7f into microsoft:master Feb 14, 2020
@JackBoosY JackBoosY deleted the dev/jack/7993 branch February 14, 2020 04:07
KineticTheory pushed a commit to KineticTheory/vcpkg that referenced this pull request Feb 17, 2020
* [osg]Fix dynamic build.

* [sdl1]Fix linux command.

* [osg]Fix linux build: disable present3D and osgstaticview.

* [osg]fix windows build-only for windows.

* [osg]Fix file INSTALL error.

* [osg]Add dependency conditions.

* [osg]disable OSG_USE_UTF8_FILENAME in Linux and OSX.

* [osg]Fix find dependency curl. Replace version num by macro.

* [osg]Add option CMAKE_CXX_STANDARD

* [osg] Remove library prefix.

* [osg] Fix install pdbs

* [osg] Remove usless plugin libs.

* update baseline

* update baseline

* update baseline

* update baseline
@chausner
Copy link
Contributor

chausner commented Oct 9, 2021

This PR added the patch file fix-builderror-with-libtiff.patch but it was not getting applied in the portfile. Let me know if it is still relevant and should be added to the portfile, otherwise I'll remove it as part of #20620.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
info:internal This PR or Issue was filed by the vcpkg team. info:reviewed Pull Request changes follow basic guidelines
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants