Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#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)

tiff.fail.version.log (126.1 KB) - added by kencu (Ken) 3 years ago.
tiff.fail.version2.log (149.3 KB) - added by kencu (Ken) 3 years ago.
after renaming VERSION to VERSION.txt

Download all attachments as: .zip

Change History (15)

Changed 3 years ago by kencu (Ken)

Attachment: tiff.fail.version.log added

Changed 3 years ago by kencu (Ken)

Attachment: tiff.fail.version2.log added

after renaming VERSION to VERSION.txt

comment:1 Changed 3 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.

Last edited 3 years ago by kencu (Ken) (previous) (diff)

comment:2 Changed 3 years ago by kencu (Ken)

Description: modified (diff)

comment:3 Changed 3 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 Changed 3 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).

Last edited 3 years ago by kencu (Ken) (previous) (diff)

comment:5 in reply to:  4 ; Changed 3 years ago by ryandesign (Ryan Carsten Schmidt)

Replying to kencu:

Do the buildbots all have case-sensitive file systems?

Yes, they always have.

comment:6 in reply to:  5 ; Changed 3 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

Last edited 3 years ago by kencu (Ken) (previous) (diff)

comment:7 Changed 3 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.

Last edited 3 years ago by kencu (Ken) (previous) (diff)

comment:8 Changed 3 years ago by kencu (Ken)

Summary: tiff @4.3.0: version:1:1: error: expected unqualified-idtiff @4.3.0: version:1:1: error: expected unqualified-id -- with newer compilers and non-case-sensitive file systems.

comment:9 in reply to:  6 Changed 3 years ago by ryandesign (Ryan Carsten Schmidt)

Status: assignedaccepted

Replying to kencu:

That's the difference, then, between non-case-sensitive file systems and the buildbot.

The buildbot sees these as different: VERSION vs version

Of course! Right. I remember now.

comment:10 Changed 3 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: acceptedclosed

In f7763023b25d7d13291177a59b3853243bb910ce/macports-ports (master):

tiff: Fix build on case-insensitive filesystems

Rename VERSION to VERSION.txt to fix build on case-insensitive
filesystems when using new C++17-supporting compilers.

Closes: #62758

comment:11 Changed 3 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 3 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 3 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.

Note: See TracTickets for help on using tickets.