Opened 5 years ago

Closed 5 years ago

Last modified 4 years ago

#59575 closed defect (fixed)

mariadb-10.2: error: no member named 'ptrdiff_t' in the global namespace, error: unknown type name 'ptrdiff_t'

Reported by: iefdev (Eric F) Owned by: michaelld (Michael Dickens)
Priority: Normal Milestone:
Component: ports Version: 2.6.2
Keywords: Cc:
Port: mariadb-10.2

Description

When upgrading the (stealth) upgrade, I recieve these errors:

$ grep -i ' error: ' ~/Desktop/mariadb-10.2_error_ptrdiff_t_main.log | grep -v 404
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_databases_mariadb-10.2/mariadb-10.2/work/server-10.2/version:1:1: error: expected unqualified-id
:info:build /opt/local/libexec/llvm-9.0/bin/../include/c++/v1/cstddef:49:9: error: no member named 'ptrdiff_t' in the global namespace
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_databases_mariadb-10.2/mariadb-10.2/work/server-10.2/version:1:1: error: expected unqualified-id
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_databases_mariadb-10.2/mariadb-10.2/work/server-10.2/version:1:1: error: expected unqualified-id
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_databases_mariadb-10.2/mariadb-10.2/work/server-10.2/version:1:1: error: expected unqualified-id
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_databases_mariadb-10.2/mariadb-10.2/work/server-10.2/version:1:1: error: expected unqualified-id
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_databases_mariadb-10.2/mariadb-10.2/work/server-10.2/sql/handler.h:914:3: error: unknown type name 'ptrdiff_t'; did you mean 'my_ptrdiff_t'?
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_databases_mariadb-10.2/mariadb-10.2/work/server-10.2/sql/sql_lifo_buffer.h:194:36: error: unknown type name 'ptrdiff_t'; did you mean 'my_ptrdiff_t'?
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_databases_mariadb-10.2/mariadb-10.2/work/server-10.2/sql/sql_lifo_buffer.h:299:34: error: unknown type name 'ptrdiff_t'; did you mean 'my_ptrdiff_t'?
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_databases_mariadb-10.2/mariadb-10.2/work/server-10.2/version:1:1: error: expected unqualified-id
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_databases_mariadb-10.2/mariadb-10.2/work/server-10.2/version:1:1: error: expected unqualified-id
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_databases_mariadb-10.2/mariadb-10.2/work/server-10.2/version:1:1: error: expected unqualified-id
:info:build /opt/local/libexec/llvm-9.0/bin/../include/c++/v1/iterator:508:13: error: unknown type name 'ptrdiff_t'; did you mean 'my_ptrdiff_t'?
:info:build /opt/local/libexec/llvm-9.0/bin/../include/c++/v1/iterator:557:56: error: unknown type name 'ptrdiff_t'; did you mean 'my_ptrdiff_t'?
:info:build /opt/local/libexec/llvm-9.0/bin/../include/c++/v1/iterator:922:66: error: unknown type name 'ptrdiff_t'; did you mean 'my_ptrdiff_t'?
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_databases_mariadb-10.2/mariadb-10.2/work/server-10.2/version:1:1: error: expected unqualified-id
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_databases_mariadb-10.2/mariadb-10.2/work/server-10.2/version:1:1: error: expected unqualified-id
:info:build /opt/local/libexec/llvm-9.0/bin/../include/c++/v1/atomic:1019:73: error: unknown type name 'ptrdiff_t'; did you mean 'my_ptrdiff_t'?
:info:build /opt/local/libexec/llvm-9.0/bin/../include/c++/v1/atomic:1024:65: error: unknown type name 'ptrdiff_t'; did you mean 'my_ptrdiff_t'?
:info:build fatal error: too many errors emitted, stopping now [-ferror-limit=]

2 attempts: 1st stopped at 35%, and the 2nd at 45%.

Attachments (2)

mariadb-10.2_error_ptrdiff_t_main.log (2.0 MB) - added by iEFdev 5 years ago.
mariadb_10.2.28_1_main.log (2.0 MB) - added by iEFdev 5 years ago.

Change History (21)

Changed 5 years ago by iEFdev

comment:1 Changed 5 years ago by jmroot (Joshua Root)

The first error is

:info:build cd /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_databases_mariadb-10.2/mariadb-10.2/work/build/storage/perfschema && /opt/local/bin/clang++-mp-9.0  -DHAVE_CONFIG_H -DMYSQL_SERVER -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_databases_mariadb-10.2/mariadb-10.2/work/build/include -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_databases_mariadb-10.2/mariadb-10.2/work/server-10.2 -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_databases_mariadb-10.2/mariadb-10.2/work/server-10.2/include -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_databases_mariadb-10.2/mariadb-10.2/work/server-10.2/sql -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_databases_mariadb-10.2/mariadb-10.2/work/build/sql -I/opt/local/include  -pipe -Os -stdlib=libc++ -fstack-protector --param=ssp-buffer-size=4 -fno-rtti -DNDEBUG -D_FORTIFY_SOURCE=2 -DDBUG_OFF -arch x86_64 -mmacosx-version-min=10.7   -I/opt/local/include  -fvisibility=hidden -o CMakeFiles/perfschema.dir/cursor_by_account.cc.o -c /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_databases_mariadb-10.2/mariadb-10.2/work/server-10.2/storage/perfschema/cursor_by_account.cc
:info:build In file included from /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_databases_mariadb-10.2/mariadb-10.2/work/server-10.2/storage/perfschema/cursor_by_account.cc:21:
:info:build In file included from /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_databases_mariadb-10.2/mariadb-10.2/work/server-10.2/include/my_global.h:328:
:info:build In file included from /opt/local/libexec/llvm-9.0/bin/../include/c++/v1/stdlib.h:100:
:info:build In file included from /opt/local/libexec/llvm-9.0/bin/../include/c++/v1/math.h:337:
:info:build In file included from /opt/local/libexec/llvm-9.0/bin/../include/c++/v1/type_traits:417:
:info:build In file included from /opt/local/libexec/llvm-9.0/bin/../include/c++/v1/cstddef:37:
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_databases_mariadb-10.2/mariadb-10.2/work/server-10.2/version:1:1: error: expected unqualified-id
:info:build MYSQL_VERSION_MAJOR=10
:info:build ^
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_databases_mariadb-10.2/mariadb-10.2/work/build/include/my_config.h:549:29: note: expanded from macro 'MYSQL_VERSION_MAJOR'
:info:build #define MYSQL_VERSION_MAJOR 10
:info:build                             ^

It looks like clang-9.0 has some preliminary C++20 support, including the addition of a <version> header, and its <cstddef> is trying to include it, but finds the file of the same name in the mariadb source instead.

comment:2 Changed 5 years ago by michaelld (Michael Dickens)

Is this still an issue with the update of MariaDB 10.2 to 10.2.28 on Nov 5? [32c03448aa4061acc3ad5676fa84a834098b0615/macports-ports]

Last edited 5 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:3 in reply to:  2 Changed 5 years ago by iEFdev

Replying to michaelld:

Is this still an issue with the update of MariaDB 10.2 to 10.2.28 on Nov 5? [32c03448aa4061acc3ad5676fa84a834098b0615/macports-ports]

Yes, still an issue… Same error as @jmroot wrote about.

Attaching new log.

Last edited 5 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

Changed 5 years ago by iEFdev

Attachment: mariadb_10.2.28_1_main.log added

comment:4 Changed 5 years ago by iEFdev

I saw you pushed a change, so I ran it again:

First attempt, the chksum for server didn't match (hm… it worked yeterday. Did they change anything):

:info:checksum The correct checksum line may be:
:info:checksum checksums           server-10.2.28.tar.gz \
:info:checksum                     rmd160  21e4229d997582c1f79bd0933695ec1b067d5954 \
:info:checksum                     sha256  911b55aec3b09941ea2339d00098ea0c2ef03c9054244bad9040b9b1375cb898 \
:info:checksum                     size    64523687 \

I tried with those, but it didn't work (ie same err).

comment:5 Changed 5 years ago by michaelld (Michael Dickens)

Stealth update ... fixed now in [4c9cf8ada448a44cf3964f67278f77c27b72a7c9/macports-ports]

They seem to do this regularly. Quite the PITA to keep up with!

Last edited 5 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:6 Changed 5 years ago by michaelld (Michael Dickens)

Looks like you're on OSX 10.7 ... can you try using the LegacySupport PG & see if that helps? Sometimes it does ... sometimes it doesn't ...

comment:7 in reply to:  6 Changed 5 years ago by iEFdev

Replying to michaelld:

Looks like you're on OSX 10.7 ... can you try using the LegacySupport PG & see if that helps? Sometimes it does ... sometimes it doesn't ...

Doesn't the Portfile already have that one set?

PortGroup           legacysupport 1.0
legacysupport.newest_darwin_requires_legacy 10

comment:8 Changed 5 years ago by michaelld (Michael Dickens)

Yes, yes it does ... apologies there! suggested without looking first (LOL?) ... ah well; had thought it worth a try!

Can you try commenting out the LegacySupport & see if that does anything (sheepish grin)?

comment:9 Changed 5 years ago by iEFdev

I tried that, but it didn't change anything.

The thing jmroot wrote about c++20… Force an older compiler?

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

Has anybody filed an upstream bug report about the build failure?

Has anybody filed an upstream bug report asking them to stop doing stealth updates?

comment:11 Changed 5 years ago by michaelld (Michael Dickens)

I haven't; guessing the answer will be "no" or "not yet" to both.

comment:12 Changed 5 years ago by michaelld (Michael Dickens)

The <version> issue is pretty critical, IMHO! I also do wish they would stop doing stealth updates; it's just bad release practice if release checksums aren't static const. IMHO.

comment:13 Changed 5 years ago by iEFdev

It's not just bad practice… It's really bad practice. :)

All it does is indicating the package was tampered with.

comment:14 Changed 5 years ago by kencu (Ken)

It's another joy of building everything with clang-9.0 on older systems, living out here on the fringes of the solar system with a shiny new compiler that pretty much nobody is using much yet :>

It builds with clang-5.0 easily enough. I tried setting the c++ standard to c++11 with

configure.cxxflags-append -std=c++11

but it didn't get plumbed everywhere, and failed.

So I tried appending it onto the compiler spec

configure.cxx-append -std=c++11

but that failed in configure.

So I did this, and moved on:

sudo port -v install mariadb configure.compiler=macports-clang-5.0
$ port -v installed mariadb
The following ports are currently installed:
  mariadb @5.5.65_0 platform='darwin 10' archs='x86_64' date='2019-08-17T13:19:42-0700'
  mariadb @5.5.66_0 (active) platform='darwin 10' archs='x86_64' date='2019-11-12T07:37:36-0800'

comment:15 Changed 5 years ago by devernay (Frédéric Devernay)

Here's how I manually fixed it, for those intersested to make a proper patch. the issue is the the madiadb source tree includes a file called "VERSION" and ctsddef from llvm-9 includes <version>, which includes that file instead, because of the case insensitive filesystem. fixed by:

  • renaming mariadb-5.5.66/VERSION to mariadb-5.5.66/VERSION.TXT
  • replacing "/VERSION" with "/VERSION.TXT" (two places) in mariadb-5.5.66/cmake/mysql_version.cmake

Those files should be in /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_databases_mariadb/mariadb/work/ after a first unsuccessful build

comment:16 Changed 5 years ago by michaelld (Michael Dickens)

Resolution: fixed
Status: assignedclosed

In 4c1e11cc877eaa5a18448b82fc1708b9a0094cde/macports-ports (master):

mariadb-10.2: move VERSION -> VERSION.txt and use the new file correctly

Closes: #59575

comment:17 in reply to:  15 Changed 5 years ago by ryandesign (Ryan Carsten Schmidt)

Replying to devernay:

the issue is the the madiadb source tree includes a file called "VERSION" and ctsddef from llvm-9 includes <version>, which includes that file instead, because of the case insensitive filesystem.

Good catch!

comment:18 Changed 5 years ago by iEFdev

What a great Christmas gift. :) Thanks Devernay. :+1:

comment:19 Changed 4 years ago by michaelld (Michael Dickens)

In 4c1e11cc877eaa5a18448b82fc1708b9a0094cde/macports-ports (dar, master, py38-reproject, revert-6945-rust-1.43.0, wireshark):

mariadb-10.2: move VERSION -> VERSION.txt and use the new file correctly

Closes: #59575

Note: See TracTickets for help on using tickets.