Skip to content
This repository has been archived by the owner on Jun 2, 2022. It is now read-only.

Fix GCC 10 compile errors #243

Merged
merged 2 commits into from
May 16, 2020
Merged

Fix GCC 10 compile errors #243

merged 2 commits into from
May 16, 2020

Conversation

Wykerd
Copy link

@Wykerd Wykerd commented May 15, 2020

Fixed issue #240 by adding stdio.h include headers to src/threadPool.cpp

@kattjevfel
Copy link

Sadly doesn't fix it, but at least the error did change!
https://gist.github.com/Kattus/8e16fcae74eb561040368b021b424d77

@Wykerd
Copy link
Author

Wykerd commented May 15, 2020

@kattus Are you building it using the AUR package?

The fix worked for me when I built it from my git repo on Archlinux kernel version 5.6.12 with GCC 10.1.0; OpenCV 4.3.0-7; OpenCL 2.2; CUDA 10.2.89-5

@kattjevfel
Copy link

kattjevfel commented May 15, 2020

@Wykerd I did, used https://aur.archlinux.org/packages/waifu2x-converter-cpp-git/ but applied this as a patch, also tried to replace source to your own repo but errors were identical (I checked with diff)

Anyway it doesn't seem to do anything wacky so I don't see how it works for you but not me.

linux-zen 5.6.13.zen1-1
gcc 10.1.0-1
opencv 4.3.0-7
opencl-headers 2:2.2.20170516-2
cuda 10.2.89-5

so only change is that I use the linux-zen kernel, I'll try using the stock kernel next.
EDIT: Nope, still same error.

EDIT2: I think I've found the cause, it does build in Debug mode, but not Release.

@Wykerd
Copy link
Author

Wykerd commented May 15, 2020

@kattus I've tried compiling it using the AUR package's method by passing the -DCMAKE_BUILD_TYPE='Release' flag to cmake and I got the same error you have.

The build instructions for linux in the BUILDING.md files says to simply call cmake .. without any flags.

@Wykerd
Copy link
Author

Wykerd commented May 15, 2020

The stdio header had to be included before thread :-)

@kattjevfel
Copy link

Yup that made it compile again, cheers! :)

@YukihoAA YukihoAA linked an issue May 16, 2020 that may be closed by this pull request
@YukihoAA YukihoAA merged commit b04069e into DeadSix27:master May 16, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Compile fails with GCC 10
3 participants