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

[harfbuzz] Build error #28168

Closed
PellTheTabber1 opened this issue Dec 5, 2022 · 24 comments · Fixed by #33072
Closed

[harfbuzz] Build error #28168

PellTheTabber1 opened this issue Dec 5, 2022 · 24 comments · Fixed by #33072
Assignees
Labels
category:port-update The issue is with a library, which is requesting update new revision

Comments

@PellTheTabber1
Copy link

package-x64-windows-dbg-out.log

Host Environment

  • OS: [e.g. Windows/Linux etc...]
  • Compiler: revision

To Reproduce

Steps to reproduce the behavior:

./vcpkg install xxxx

Failure logs

  • Cut and paste the appropriate build messages from the console output.
  • Attach every failure log file mentioned in the console output.

Additional context
C:\VSEN15U3\VC\INCLUDE\xstddef(377): error C2338: The C++ Standard doesn't provide a hash for this type.

Add any other context about the problem here, such as what you have already tried to resolve the issue.

@PellTheTabber1 PellTheTabber1 added the category:port-bug The issue is with a library, which is something the port should already support label Dec 5, 2022
@PellTheTabber1
Copy link
Author

vcpkg install --triplet x64-windows qt5-base qt5-tools

@PellTheTabber1
Copy link
Author

I ran the above command and it errored on
C:\VSEN15U3\VC\INCLUDE\xstddef(377): error C2338: The C++ Standard doesn't provide a hash for this type.

Then it said subcommand failed

@FrankXie05
Copy link
Contributor

Please update Visual Studio to 2017 or newer. harfbuzz/harfbuzz#3451

@FrankXie05 FrankXie05 added category:question This issue is a question and removed category:port-bug The issue is with a library, which is something the port should already support labels Dec 5, 2022
@PellTheTabber1
Copy link
Author

PellTheTabber1 commented Dec 5, 2022

Thank you for assigning someone, I've been out of the Powertab loop for many years, but I'm back and hopefully will start writing some good code again. I will help improve it but I have NO idea why I can't get the QT stuff to run.
Updzte: You mean I need to upgrade my Visual STudio? As in there's no way I can get it it build with VS 2015? Please comment
I;m installing 2017 Enterprise now

@FrankXie05
Copy link
Contributor

The upstream cannot adapt to the VS2015 C++standard. Please use a version later than 2017. :)

@PellTheTabber1
Copy link
Author

I have VS 2015 and 2017. My 2015 version is a nice piece due to features I added almost 10 years ago. It will never die! But I posted a thread to get help with why Qt and Qt tools aren't installing. Should I just download the binaries? Did you look at the error?

@PellTheTabber1
Copy link
Author

iS IT A cmAKE VERSION ISSUE?

@dg0yt
Copy link
Contributor

dg0yt commented Dec 11, 2022

iS IT A cmAKE VERSION ISSUE?

AFAIU it is an upstream (harfbuzz) requirement with regard to the Visual Studio version. Not a vcpkg issue.

@PellTheTabber1
Copy link
Author

PellTheTabber1 commented Dec 20, 2022

iS IT A cmAKE VERSION ISSUE?

AFAIU it is an upstream (harfbuzz) requirement with regard to the Visual Studio version. Not a vcpkg issue.

The documentation says that having VS 2015 Update 3 or greater is the requirement. I guess I thought VS2017 would satisfy that.

I just realized that the Visual Studio 2017 environment has to be set by a .bat file unlike VS 2015U3 but I still don't think that that is the problem, nevertheless I'll set up those variables and try again with the QT build. I assume I unzipped Ninja tools from it's zip file ok as it seems to know about it.

VS 2015 Update 3 supports C++ 17, it's the first of the compilers to do that. Previously it was only like C+++ 14 or so.

@FrankXie05
Copy link
Contributor

@PellTheTabber1 does the issue still occur?

@PellTheTabber1
Copy link
Author

PellTheTabber1 commented Dec 23, 2022

Yes, I need to look in detail at vcpkg and try to feed it something to make the build go more as planned, perhaps some vvariables need to be set. I don';t yet know which ones. Perhaps the entire set of tools has to be rebuilt and forced to use a certain compiler.
I'm going to reinstall CMake. I;m not sure I have the latest one. I think it should build this time - I just reinstalled everything in new directories and used a Powershell - should change my luck.
It seems to have finished this time without errors.

@PellTheTabber1
Copy link
Author

@PellTheTabber1 does the issue still occur?

Issue resolved.

@PellTheTabber1
Copy link
Author

PellTheTabber1 commented Dec 25, 2022

The make isn't going well, it seems to be using Microsoft's cmake which is version 3.12, while my own install is version 3.25. So I've tried to change that. Not sure if I can have Microsoft's CMake. ASnd it can't find the boost header files. 2 errors so far in the build process - it's set to run CMake automatically when I open the project in Team Explorer. I accidentally installed CMake under my Users directory, something I absolutely cannot stand about the install. It never asked me where I wanted to install it, thanks a lot. I set my environment variable for the BOOST_DIR but I'm not sure it's right. And one other thing, the install by vcpkg has 212, 553 files which takes up 31GB. That's too much when we only use a little of the boost libs. I need to pare that down. Perhaps I need to install the boost stuff separately to what is in vcpkg directory? I'll look into that. boost operators?

@dg0yt
Copy link
Contributor

dg0yt commented Dec 25, 2022

The more you move towards a non-standard environment, and the more issues you start to mix, the less likely you will get quick and good support.

My 2015 version is a nice piece due to features I added almost 10 years ago. It will never die!

Fine. But vcpkg won't magically resolve the tool version requirements of the packages you want to use. It provides tested configurations, cross-platform.

perhaps some vvariables need to be set. I don';t yet know which ones.

For windows triplets, vcpkg will clean most environment variables, to avoid even more problems.

the install by vcpkg has 212, 553 files which takes up 31GB. That's too much when we only use a little of the boost libs. I need to pare that down. Perhaps I need to install the boost stuff separately to what is in vcpkg directory?

Too general to provide precise hints.
vcpkg doesn't take much action to clean certain build directories unless explicitly asked to do it.
It builds debug and release configurations, and it may build packages for the host triplet in addition to the target triplet if they differ. This can take up a lot of space, in particular if you want to build Qt.

@PellTheTabber1
Copy link
Author

PellTheTabber1 commented Dec 26, 2022

I would guess that my CMake has not been set up at all yet - the CATCH_INCLUDES etc.. It's all unset as I've checked. I did not use any "external" tools in the previous builds I had done in Visual Studio 2015U3. I have to set up CMake to work properly. I also wonder why the vcpkg builds do NOT include header files, I don't see any .hpp files so I'm using my separate install of boost for that. Not much I can do without the headers. My old builds were with boost version 1.56 and I had an environment variable set for that. I notice the JSON file in the Github/powertabeditor/.vs doesn't seem set to use vcpkg. Perhaps I need to set this after doing a clone of a project? It needs to point the toolchain file to vcpkg. There's a lot different in the newer builds from what it was in 2016 which is when I last wrote code for Powertab. There's a lot that seems different - my CMake is still using the old settings for Boost, yet it find the new location if the newer boost - odd?.

@dg0yt
Copy link
Contributor

dg0yt commented Dec 26, 2022

I can't help you much at that point but

my CMake is still using the old settings

... successful problem tracing in Cmake starts with a fresh build directory. Caching settings is a key feature of CMake, but it may miss changes to the environment.

@PellTheTabber1
Copy link
Author

PellTheTabber1 commented Dec 26, 2022

I can't help you much at that point but

my CMake is still using the old settings

... successful problem tracing in Cmake starts with a fresh build directory. Caching settings is a key feature of CMake, but it may miss changes to the environment.

I need to stop in my tracks and simply configure Microsoft's CMake, not the one I installed as CMake is not easily changed to external (other than with hard to manage symbolic links). So I need to close the CMake GUI and simply work with Microsoft's CMake. There are just some settings that need to be set up correctly. It doesn't find the Boost libs date_time, iostreams, and it doesn't find some doctest file or something. I need to simply figure out why the internal CMake cannot find the perfectly built libraries for date_time and iostreams. I had thought that my download of the project via clone would set everything needed but it;s not quite that simple. The Cache might also be the problem.

@dg0yt
Copy link
Contributor

dg0yt commented Dec 26, 2022

Just to help separate different cases:

  • Building ports: If you use vcpkg install, vcpkg tool will take care of CMake and toolchain (based on target triplet).
  • Building your user project: You can choose which CMake to use, but you must use vcpkg's cmake toolchain file (but you can chainload another toolchain file). This is how vcpkg's install locations and CMake wrappers get into your build.
  • If your project is coming with a vcpkg.json, vcpkg's cmake toolchain file will enable "manifest mode" and implicitly call vcpkg install with additional parameters. (In contrast to the first bullet point, it will consider the toolchain and binary dir settings, and it will choose another installation directory.)

@PellTheTabber1
Copy link
Author

PellTheTabber1 commented Dec 26, 2022

Just to help separate different cases:

  • Building ports: If you use vcpkg install, vcpkg tool will take care of CMake and toolchain (based on target triplet).
  • Building your user project: You can choose which CMake to use, but you must use vcpkg's cmake toolchain file (but you can chainload another toolchain file). This is how vcpkg's install locations and CMake wrappers get into your build.
  • If your project is coming with a vcpkg.json, vcpkg's cmake toolchain file will enable "manifest mode" and implicitly call vcpkg install with additional parameters. (In contrast to the first bullet point, it will consider the toolchain and binary dir settings, and it will choose another installation directory.)

I am going to change my environment settings to use the packages I've already buillt which I now realize DO have the headers - it's just the headers are not in the root directory. I'll try to find date_time and iostreams using the vcpkg stuff which kind of makes sense. I'll stick to the Microsoft CMake for now as it's the default. I can try the other CMake once the CMake finds the boost libs. I have no idea why it finds some boost stuff and not others. When I ran vcpkg to install all the boost dependencies and Qt5, it puts the libraries .lib files not all in the same directory like a regular non-vcpkg install would so I'm left wondering if I simply put in some root of it all to get it to find the .lib corresponding to the dlls. So I need to reset lib in my environment variables and hope it finds the boost libs. Does anyone know why vcpkg doesn't use a common output directory for the headers and the libs?
I simply followed the below directions on Github, some part of the directions isn't right for my machine, perhaps the last step involving the tool-chain file - in my case, perhaps it should be unset as I'm not running CMake manually, but building instead within Visual Studio:

Windows:
Install Git - see https://help.github.com/articles/set-up-git
Install vcpkg and run vcpkg install --triplet x64-windows boost-algorithm boost-date-time boost-endian boost-functional boost-iostreams boost-range boost-rational boost-signals2 boost-stacktrace doctest minizip nlohmann-json pugixml to install dependencies.
Install Qt by running vcpkg install --triplet x64-windows qt5-base qt5-tools (this may take a while), or install a binary release from the Qt website or https://github.com/miurahr/aqtinstall.
Open the project folder in Visual Studio and build.
If running CMake manually, set CMAKE_TOOLCHAIN_FILE to [vcpkg root]\scripts\buildsystems\vcpkg.cmake).

It must know where Boost is, how else could it output the following line to the output/error log with the following warning:
if(NOT Boost_VERSION VERSION_LESS 106900)
message(WARNING "New Boost version may have incorrect or missing dependencies and imported targets")
endif()

@PellTheTabber1
Copy link
Author

PellTheTabber1 commented Dec 26, 2022

This is the problem: I am using a version of Boost 1.81 that is later than the files in the build and there are no lines to check the build even in the below snippet (I need to hand-code some lines in there to get it all started):

if(NOT Boost_VERSION VERSION_LESS 106900)
message(WARNING "New Boost version may have incorrect or missing dependencies and imported targets")
endif()

I also think I need to add a property sheet to Visual Studio after I build boost.

All the build does is warn me that I have a newer version, I'm not sure about this.

@luzpaz
Copy link
Contributor

luzpaz commented Jul 11, 2023

What's the verdict of this ticket ?
(JFYI, harfbuzz 8.0 was just released)

@github-actions
Copy link

github-actions bot commented Aug 8, 2023

This is an automated message. Per our repo policy, stale issues get closed if there has been no activity in the past 28 days. The issue will be automatically closed in 14 days. If you wish to keep this issue open, please add a new comment.

@github-actions github-actions bot added the Stale label Aug 8, 2023
@luzpaz
Copy link
Contributor

luzpaz commented Aug 8, 2023

bump

Edit: https://github.com/harfbuzz/harfbuzz/releases/tag/8.1.1 is latest stable

@FrankXie05
Copy link
Contributor

I think this issue can be closed, it just involves some configuration issues using vcpkg and harfbuzz.

All the build does is warn me that I have a newer version, I'm not sure about this.

And about new version, I can submit a PR to close this issue.

@github-actions github-actions bot removed the Stale label Aug 9, 2023
@FrankXie05 FrankXie05 added category:port-update The issue is with a library, which is requesting update new revision and removed category:question This issue is a question labels Aug 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:port-update The issue is with a library, which is requesting update new revision
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants