Opened 6 weeks ago
Last modified 6 weeks ago
#70676 reopened defect
gmic-lib: Unable to upgrade on Mtn Lion - fatal error: use of undeclared identifier 'AT_FDCWD'
Reported by: | RobK88 | Owned by: | Ken <21211439+kencu@…> |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.10.1 |
Keywords: | mtnlion | Cc: | Schamschula (Marius Schamschula), RobK88 |
Port: | gmic-lib legacy-support |
Description
I am unable to upgrade the port gmic
from version 3.4.0. to version 3.4.1 on Mtn Lion.
I see the following error:
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_science_gmic/gmic-lib/work/compwrap/cxx/opt/local/bin/clang++-mp-17 -o libgmic.o -c gmic.cpp -Dgmic_core -fPIC -Os -arch x86_64 -Dgmic_community -Dcimg_date=\"\" -Dcimg_time=\"\" -Dcimg_use_zlib -I. -std=c++11 -pedantic -Wall -Wextra -Wfatal-errors -Werror=unknown-pragmas -Werror=unused-label -Wshadow -Dcimg_use_abort -Dgmic_is_parallel -Dcimg_use_fftw3 -Dcimg_use_curl -I/opt/local/libexec/openssl3/include -Dcimg_use_png -I/opt/local/include/libpng16 -Dcimg_use_jpeg -Dcimg_use_tiff -Dcimg_display=1 -I/opt/local/include -Dcimg_use_openexr -pthread -I/opt/local/include/OpenEXR -I/opt/local/include/Imath In file included from gmic.cpp:1786: In file included from ./gmic.h:261: In file included from ./CImg.h:613: In file included from /opt/local/include/OpenEXR/ImfRgbaFile.h:22: In file included from /opt/local/include/OpenEXR/ImfHeader.h:25: /opt/local/include/OpenEXR/ImfAttribute.h:257:54: warning: unused parameter 'version' [-Wunused-parameter] 257 | OPENEXR_IMF_INTERNAL_NAMESPACE::OStream& os, int version) const | ^ /opt/local/include/OpenEXR/ImfAttribute.h:266:54: warning: unused parameter 'size' [-Wunused-parameter] 266 | OPENEXR_IMF_INTERNAL_NAMESPACE::IStream& is, int size, int version) | ^ /opt/local/include/OpenEXR/ImfAttribute.h:266:64: warning: unused parameter 'version' [-Wunused-parameter] 266 | OPENEXR_IMF_INTERNAL_NAMESPACE::IStream& is, int size, int version) | ^ In file included from gmic.cpp:1786: In file included from ./gmic.h:261: ./CImg.h:67455:45: fatal error: use of undeclared identifier 'AT_FDCWD' 67455 | if (cimg::is_file(buf) && faccessat(AT_FDCWD, buf, X_OK, AT_EACCESS) == 0) { delete[] buf; return true; } | ^ 3 warnings and 1 error generated. make[1]: *** [libgmic.o] Error 1 make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_science_gmic/gmic-lib/work/gmic-3.4.1/src' make: *** [lib] Error 2 make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_science_gmic/gmic-lib/work/gmic-3.4.1/src' Command failed: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_science_gmic/gmic-lib/work/gmic-3.4.1/src" && /usr/bin/make -w lib NO_STDLIB=Yes OPT_CFLAGS="" SOVERSION=1 X11_CFLAGS="-Dcimg_display=1 -I/opt/local/include" X11_LIBS="-L/opt/local/lib -lX11 -lpthread" USR=/opt/local CC="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_science_gmic/gmic-lib/work/compwrap/cc/opt/local/bin/clang-mp-17" CXX="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_science_gmic/gmic-lib/work/compwrap/cxx/opt/local/bin/clang++-mp-17" OBJC="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_science_gmic/gmic-lib/work/compwrap/objc/opt/local/bin/clang-mp-17" OBJCXX="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_science_gmic/gmic-lib/work/compwrap/objcxx/opt/local/bin/clang++-mp-17" INSTALL="/usr/bin/install -c" Exit code: 2 Error: Failed to build gmic-lib: command execution failed Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_science_gmic/gmic-lib/main.log for details. Error: Follow https://guide.macports.org/#project.tickets if you believe there is a bug.
For more details, please see the attached main.log
.
Attachments (2)
Change History (15)
Changed 6 weeks ago by RobK88
comment:1 Changed 6 weeks ago by RobK88
Cc: | RobK88 added |
---|
comment:2 Changed 6 weeks ago by RobK88
Summary: | gmic-lib - Unable to upgrade on Mtn Lion - fatal error: use of undeclared identifier 'AT_FDCWD' → gmic-lib: Unable to upgrade on Mtn Lion - fatal error: use of undeclared identifier 'AT_FDCWD' |
---|
comment:3 Changed 6 weeks ago by Schamschula (Marius Schamschula)
comment:4 Changed 6 weeks ago by kencu (Ken)
that is covered by legacysupport, so step 1 might be to add that.
comment:5 Changed 6 weeks ago by RobK88
Port: | legacy-support added |
---|
comment:6 Changed 6 weeks ago by RobK88
Thanks Ken. I jave added the legacysupport
port to this ticket. But I am unable to add any of the legacysupport
maintainers to the cc list.
comment:7 Changed 6 weeks ago by kencu (Ken)
the port already uses legacysupport I see, just have to change the blocker from this:
legacysupport.newest_darwin_requires_legacy 10
to this:
legacysupport.newest_darwin_requires_legacy 13
and give it a try.
comment:8 Changed 6 weeks ago by Ken <21211439+kencu@…>
Owner: | set to Ken <21211439+kencu@…> |
---|---|
Resolution: | → fixed |
Status: | new → closed |
comment:9 Changed 6 weeks ago by kencu (Ken)
I went ahead and did it for you.
let's see if that fixes this build error.
comment:10 Changed 6 weeks ago by kencu (Ken)
Resolution: | fixed |
---|---|
Status: | closed → reopened |
link fails.
At first glance, it looks like the legacysupport library is not getting added.
/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_science_gmic/gmic-clib/work/compwrap/cxx/opt/local/bin/clang++-mp-17 -dynamiclib -o libgmic.1.dylib -install_name /opt/local/lib/libgmic.1.dylib -compatibility_version 1 -current_version 3.4.1 -Dcimg_date=\\\"\\\" -Dcimg_time=\\\"\\\" -Dcimg_use_zlib -I. -std=c++11 -pedantic -Wall -Wextra -Wfatal-errors -Werror=unknown-pragmas -Werror=unused-label -Wshadow libgmic.o -L/opt/local/lib -lz -L. -L/opt/local/lib -Wl,-rpath,. -lpthread -L/opt/local/lib -lfftw3 -lfftw3_threads -L/opt/local/lib -lcurl -L/opt/local/lib -lpng16 -L/opt/local/lib -ljpeg -L/opt/local/lib -ltiff -L/opt/local/lib -lX11 -lpthread -L/opt/local/lib -lOpenEXR-3_2 -lOpenEXRUtil-3_2 -lOpenEXRCore-3_2 -lIex-3_2 -lIlmThread-3_2 -lImath-3_1
comment:11 Changed 6 weeks ago by RobK88
Thanks Ken. Your change did help. The compile went further but then stopped with another undefined symbol error:
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_science_gmic/gmic-lib/work/compwrap/cxx/opt/local/bin/clang++-mp-17 -dynamiclib -o libgmic.1.dylib -install_name /opt/local/lib/libgmic.1.dylib -compatibility_version 1 -current_version 3.4.1 -Dcimg_date=\\\"\\\" -Dcimg_time=\\\"\\\" -Dcimg_use_zlib -I. -std=c++11 -pedantic -Wall -Wextra -Wfatal-errors -Werror=unknown-pragmas -Werror=unused-label -Wshadow libgmic.o -L/opt/local/lib -lz -L. -L/opt/local/lib -Wl,-rpath,. -lpthread -L/opt/local/lib -lfftw3 -lfftw3_threads -L/opt/local/lib -lcurl -L/opt/local/lib -lpng16 -L/opt/local/lib -ljpeg -L/opt/local/lib -ltiff -L/opt/local/lib -lX11 -lpthread -L/opt/local/lib -lOpenEXR-3_2 -lOpenEXRUtil-3_2 -lOpenEXRCore-3_2 -lIex-3_2 -lIlmThread-3_2 -lImath-3_1 Undefined symbols for architecture x86_64: "_faccessat", referenced from: gmic_library::cimg::posix_searchpath(char const*) in libgmic.o ld: symbol(s) not found for architecture x86_64 clang++: fatal error: linker command failed with exit code 1 (use -v to see invocation) make[1]: *** [libgmic.so] Error 1 make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_science_gmic/gmic-lib/work/gmic-3.4.1/src' make: *** [lib] Error 2 make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_science_gmic/gmic-lib/work/gmic-3.4.1/src' Command failed: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_science_gmic/gmic-lib/work/gmic-3.4.1/src" && /usr/bin/make -w lib NO_STDLIB=Yes OPT_CFLAGS="" SOVERSION=1 X11_CFLAGS="-Dcimg_display=1 -I/opt/local/include" X11_LIBS="-L/opt/local/lib -lX11 -lpthread" USR=/opt/local CC="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_science_gmic/gmic-lib/work/compwrap/cc/opt/local/bin/clang-mp-17" CXX="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_science_gmic/gmic-lib/work/compwrap/cxx/opt/local/bin/clang++-mp-17" OBJC="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_science_gmic/gmic-lib/work/compwrap/objc/opt/local/bin/clang-mp-17" OBJCXX="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_science_gmic/gmic-lib/work/compwrap/objcxx/opt/local/bin/clang++-mp-17" INSTALL="/usr/bin/install -c" Exit code: 2 Error: Failed to build gmic-lib: command execution failed Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_science_gmic/gmic-lib/main.log for details. Error: Unable to execute port gmic: upgrade gmic-lib failed
I have attached another main.log
comment:12 Changed 6 weeks ago by RobK88
@kencu I was mistaken. You were right. Your changes had no effect. It looks like the reason why the compile went further today for gmic-lib
is due to updated dependencies. Both gobject-introspection
and libsdl2
were updated. Now we have another undefined symbol - _faccessat
comment:13 Changed 6 weeks ago by kencu (Ken)
oh, the build does get further, and the changes I made were needed.
Just not sufficient yet, as the legacysupport library is not being added to the link libraries.
Usually the legacysupport PG can automatically add it, but not working in this so someone will need to dig in and find out why not
Sorry, I can't help you with Mountain Lion. I don't run any machines with non-current macOS versions, and thus can't test any fixes.
Hopefully, one of the fellow maintainers who works on backwards compatibility will chime in.