#62758 closed defect (fixed)
tiff @4.3.0: version:1:1: error: expected unqualified-id -- with newer compilers and non-case-sensitive file systems.
Reported by: | kencu (Ken) | Owned by: | ryandesign (Ryan Carsten Schmidt) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | |
Keywords: | Cc: | ||
Port: | tiff |
Description (last modified by kencu (Ken))
On 10.6.8, building with clang-9.0, we see this:
:info:build In file included from /opt/local/libexec/llvm-9.0/bin/../include/c++/v1/cstddef:37: :info:build ../version:1:1: error: expected unqualified-id :info:build 4.3.0
tiff has a header named VERSION that collides with the c++17 header of the same name.
unfortunately simply renaming it to VERSION.txt doesn't work in this case as the Makefile wants to use it later:
:info:build make[2]: Entering directory `/opt/local/var/macports/build/_opt_macportsofficial_macports-ports_graphics_tiff/tiff/work/tiff-4.3.0-x86_64' :info:build make[2]: *** No rule to make target `VERSION', needed by `all-am'. Stop. :info:build make[2]: Leaving directory `/opt/local/var/macports/build/_opt_macportsofficial_macports-ports_graphics_tiff/tiff/work/tiff-4.3.0-x86_64' :info:build make[1]: *** [all-recursive] Error 1
so it will need some kind of better fix.
Attachments (2)
Change History (15)
Changed 4 years ago by kencu (Ken)
Attachment: | tiff.fail.version.log added |
---|
Changed 4 years ago by kencu (Ken)
Attachment: | tiff.fail.version2.log added |
---|
comment:1 Changed 4 years ago by kencu (Ken)
the quicky fix is to build it with clang-5.0, as that has no header named version
, while this gets sorted out.
comment:2 Changed 4 years ago by kencu (Ken)
Description: | modified (diff) |
---|
comment:3 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)
Thanks for reporting this, but it succeeded on the buildbot on all systems, including 10.6.8 with clang-9.0. Can you think of something different about your system that might explain it? I see you're building universal but it would surprise me a little if that were the cause.
Instead of changing the compiler, adding configure.cxxflags-append -std=c++98
might allow it to build with newer compilers. If you can check that, and that works, I'd be happy to add that to the portfile.
comment:4 follow-up: 5 Changed 4 years ago by kencu (Ken)
Do the buildbots all have case-sensitive file systems?
(I will try the c++98 fix once qt4-mac finally finishes rebuilding).
comment:5 follow-up: 6 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)
comment:6 follow-up: 9 Changed 4 years ago by kencu (Ken)
Replying to ryandesign:
Replying to kencu:
Do the buildbots all have case-sensitive file systems?
Yes, they always have.
That's the difference, then, between non-case-sensitive file systems and the buildbot.
The buildbot sees these as different: VERSION
vs version
comment:7 Changed 4 years ago by kencu (Ken)
I will admit I hoped setting the standard might make the compiler avoid the new header, but no such luck. Same name collision occurs.
I guess the folder of header files does not change with the standard, so the compiler still looks for version
and (in the case of a non-case-sensitive FS) finds VERSION
.
comment:8 Changed 4 years ago by kencu (Ken)
Summary: | tiff @4.3.0: version:1:1: error: expected unqualified-id → tiff @4.3.0: version:1:1: error: expected unqualified-id -- with newer compilers and non-case-sensitive file systems. |
---|
comment:9 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)
Status: | assigned → accepted |
---|
Replying to kencu:
That's the difference, then, between non-case-sensitive file systems and the buildbot.
The buildbot sees these as different:
VERSION
vsversion
Of course! Right. I remember now.
comment:10 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)
Resolution: | → fixed |
---|---|
Status: | accepted → closed |
comment:11 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)
Not quite sure what to do with this information so I'll just record it here for posterity:
I am able to reproduce the problem on macOS 10.13.6 building tiff @4.3.0 non-universal in trace mode with clang 9:
sudo port clean tiff sudo port -t build tiff -universal configure.compiler=macports-clang-9.0
But now I see that if I do not use trace mode then the build succeeds:
sudo port clean tiff sudo port build tiff -universal configure.compiler=macports-clang-9.0
comment:12 Changed 4 years ago by kencu (Ken)
Well -- that is interesting. Trace mode does a lot of processing of the file tree that the build is accessing, including normalizing the path/filename. I wonder if that normalization process removes the distinction between VERSION and version that a case-sensitive file system gives.
comment:13 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)
No, I'm certain it does not do that. I probably just have something installed that you didn't that tiff is accessing opportunistically. I didn't spend a lot of time trying to figure out what it was.
after renaming VERSION to VERSION.txt