Install open-vm-tools-nox11 fails with compile errors at function Util_SafeStrdup(), because of undefined identifiers: DIRSEPS. This was fixed some time ago, now it is there again (regression?). it doesn't matter if it is a new install or an upgrade to an existing system: # pkg info -d emulators/open-vm-tools-nox11 open-vm-tools-nox11-1280544_7,1: libdnet-1.12 pcre-8.35 libnotify-0.7.5_1 icu-53.1 glib-2.36.3_4 # pkg delete -f open-vm-tools-nox11 libdnet pcre libnotify icu glib # portinstall open-vm-tools-nox11 [...] --- libvmtools_la-signalSource.lo --- libtool: compile: cc -DPACKAGE_NAME=\"open-vm-tools\" -DPACKAGE_TARNAME=\"open-vm-tools\" -DPACKAGE_VERSION=\"9.4.0\" "-DPACKAGE_STRING=\"open-vm-tools 9.4.0\"" -DPACKAGE_BUGREPORT=\"open-vm-tools-devel@lists.sourceforge.net\" -DPACKAGE_URL=\"\" -DPACKAGE=\"open-vm-tools\" -DVERSION=\"9.4.0\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DX_DISPLAY_MISSING=1 -DHAVE_DLOPEN=1 -DNO_PROCPS=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_WCHAR_H=1 -DHAVE_SYS_PARAM_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_USER_H=1 -DHAVE__BOOL=1 -DHAVE_STDBOOL_H=1 -DHAVE_STRUCT_STAT_ST_RDEV=1 -DTIME_WITH_SYS_TIME=1 -DNO_XSM=1 -DNO_XCOMPOSITE=1 -DNO_MULTIMON=1 -I. -DVMTOOLS_USE_GLIB -DNO_LOG_STUB -DVMTOOLS_DATA_DIR=\"/usr/local/share/open-vm-tools\" -I/usr/local/include/glib-2.0 -I/usr/local/include -I/usr/ports/emulators/open-vm-tools-nox11/work/open-vm-tools-9.4.0-1280544/lib/include -I/usr/ports/emulators/open-vm-tools-nox11/work/open-vm-tools-9.4.0-1280544/lib/include -Wno-deprecated-declarations -DUSING_AUTOCONF=1 -DOPEN_VM_TOOLS -I/usr/local/include -I/usr/local/include -DUSE_ICU -DHAVE_ICU_38 -DVMX86_TOOLS -O2 -pipe -fno-strict-aliasing -Wall -Werror -Wno-unused-function -Wno-pointer-sign -Wno-unused-value -fno-strict-aliasing -Wno-unknown-pragmas -Wno-uninitialized -MT libvmtools_la-signalSource.lo -MD -MP -MF .deps/libvmtools_la-signalSource.Tpo -c signalSource.c -o libvmtools_la-signalSource.o >/dev/null 2>&1 --- libvmtools_la-i18n.lo --- i18n.c:634:15: error: implicit declaration of function 'Unicode_IsBufferValid' is invalid in C99 [-Werror,-Wimplicit-function-declaration] if (!Unicode_IsBufferValid(name, strlen(name) + 1, STRING_ENCODING_UTF8) || ^ i18n.c:740:17: error: implicit declaration of function 'Util_SafeStrdup' is invalid in C99 [-Werror,-Wimplicit-function-declaration] dfltdir = Util_SafeStrdup(VMTOOLS_DATA_DIR); ^ i18n.c:740:15: error: incompatible integer to pointer conversion assigning to 'char *' from 'int' [-Werror,-Wint-conversion] dfltdir = Util_SafeStrdup(VMTOOLS_DATA_DIR); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ i18n.c:748:35: error: use of undeclared identifier 'DIRSEPS' catdir, DIRSEPS, DIRSEPS, lang, DIRSEPS, domain); ^ i18n.c:758:21: error: incompatible integer to pointer conversion assigning to 'gchar *' (aka 'char *') from 'int' [-Werror,-Wint-conversion] usrlang = Util_SafeStrdup(lang); ^ ~~~~~~~~~~~~~~~~~~~~~ i18n.c:763:41: error: use of undeclared identifier 'DIRSEPS' catdir, DIRSEPS, DIRSEPS, usrlang, DIRSEPS, domain); ^ 6 errors generated. *** [libvmtools_la-i18n.lo] Error code 1 make[2]: stopped in /usr/ports/emulators/open-vm-tools-nox11/work/open-vm-tools-9.4.0-1280544/libvmtools --- libvmtools_la-monotonicTimer.lo --- mv -f .deps/libvmtools_la-monotonicTimer.Tpo .deps/libvmtools_la-monotonicTimer.Plo --- libvmtools_la-vmtools.lo --- mv -f .deps/libvmtools_la-vmtools.Tpo .deps/libvmtools_la-vmtools.Plo --- libvmtools_la-signalSource.lo --- mv -f .deps/libvmtools_la-signalSource.Tpo .deps/libvmtools_la-signalSource.Plo 1 error make[2]: stopped in /usr/ports/emulators/open-vm-tools-nox11/work/open-vm-tools-9.4.0-1280544/libvmtools *** [all-recursive] Error code 1 make[1]: stopped in /usr/ports/emulators/open-vm-tools-nox11/work/open-vm-tools-9.4.0-1280544 1 error make[1]: stopped in /usr/ports/emulators/open-vm-tools-nox11/work/open-vm-tools-9.4.0-1280544 ===> Compilation failed unexpectedly. Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to the maintainer. *** Error code 1 Stop. make: stopped in /usr/ports/emulators/open-vm-tools-nox11 ** Command failed [exit code 1]: /usr/bin/script -qa /tmp/portinstall20140909-97059-1yreipz env make ** Fix the problem and try again. ** Listing the failed packages (-:ignored / *:skipped / !:failed) ! emulators/open-vm-tools-nox11 (unknown build error) # pkg info open-vm-tools-nox11 libdnet pcre libnotify icu glib pkg: No package(s) matching open-vm-tools-nox11 libdnet-1.12 pcre-8.35 libnotify-0.7.5_1 icu-53.1 glib-2.36.3_4
Related errors: 191339
function "Unicode_IsBufferValid" seems never defined too.
Over to maintainer
Hi, Is the reported problem still present with the current ports tree?
I try it with clang and gcc49 on 10.2-RELEASE amd64 both ended with the same failure as above.
Unicode_IsBufferValid is declared in lib/unicode/unicodeSimpleBase.c which is not included in work/open-vm-tools-9.4.0-1280544/libvmtools.
There was something wrong in the clipboard .. is declared in lib/include/unicodeBase.h which is not included in work/open-vm-tools-9.4.0-1280544/libvmtools/i18n.c.
And DIRSEPS: /modules/freebsd/vmhgfs/fsutil.h:#define DIRSEPS "/"
Created attachment 167168 [details] patch-libvmtools__i18n.c
The patch should copied in the MASTERPORt emulators/open-vm-tools.
Created attachment 167169 [details] patch-libvmtools__i18n.c There was a typo in it.
Created attachment 167170 [details] poudriere-open-vm-tools-nox11-1280544_12,1.log
Btw, there is a newer version 10.0.5 https://sourceforge.net/projects/open-vm-tools/files/
Hi, Can you please test the patch in PR 212471 and see if that still exhibits the same issue?
There is something wrong with the patches. I could not test it.
After I make your patch, nearly all patches from files directory are rejected.
(In reply to w.schwarzenfeld from comment #16) Thanks for trying. Perhaps you need to remove the old files (.orig) and empty files (several) from the files dir. SVN has a tendency to leave those, which patch chokes on.
I have tried this yesterday (to remove before "make" remove the .orig files). e.g. ===> Extracting for open-vm-tools-10.1.0,2 => SHA256 Checksum OK for open-vm-tools-10.1.0-4449150.tar.gz. ===> Patching for open-vm-tools-10.1.0,2 ===> Applying FreeBSD patches for open-vm-tools-10.1.0,2 I can't seem to find a patch in there anywhere. => FreeBSD patch patch-base64rename failed to apply cleanly. *** Error code 1
(In reply to w.schwarzenfeld from comment #18) The patch-base64rename is one of the patches that was deleted, so it ends up as an empty patch file that confuses the patch command. Run this: find /usr/ports/emulators/open-vm-tools -type f -empty -delete and then try again please. Steve
configure: error: C++ compiler not found. Make sure you have a C++ compiler installed or configure without X11 (using --without-x) and without ICU (using --without-icu). ===> Script "configure" failed unexpectedly. Please report the problem to swills@FreeBSD.org [maintainer] and attach the "/ram/usr/ports/emulators/open-vm-tools/work/open-vm-tools-10.1.0-4449150/open-vm-tools/config.log" including the output of the failure of your make command. Also, it might be a good idea to provide an overview of all packages installed on your system (e.g. a /usr/local/sbin/pkg-static info -g -Ea). *** Error code 1
Sorry was CCACHE, but: mv -f .deps/util.Tpo .deps/util.Plo 1 error make[4]: stopped in /usr/ports/emulators/open-vm-tools-nox11/work/open-vm-tools-10.1.0-4449150/open-vm-tools/lib/user *** [all-recursive] Error code 1 make[3]: stopped in /usr/ports/emulators/open-vm-tools-nox11/work/open-vm-tools-10.1.0-4449150/open-vm-tools/lib 1 error make[3]: stopped in /usr/ports/emulators/open-vm-tools-nox11/work/open-vm-tools-10.1.0-4449150/open-vm-tools/lib *** [all-recursive] Error code 1 make[2]: stopped in /usr/ports/emulators/open-vm-tools-nox11/work/open-vm-tools-10.1.0-4449150/open-vm-tools 1 error make[2]: stopped in /usr/ports/emulators/open-vm-tools-nox11/work/open-vm-tools-10.1.0-4449150/open-vm-tools ===> Compilation failed unexpectedly. Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to the maintainer. *** Error code 1 Stop. make[1]: stopped in /usr/ports/emulators/open-vm-tools-nox11 *** Error code 1 Stop.
The error was few lines above utilBacktrace.c:155:20: error: implicit declaration of function '_Unwind_GetCFA' is invalid in C99 [-Werror,-Wimplicit-function-declaration] uintptr_t cfa = _Unwind_GetCFA(ctx); ^ utilBacktrace.c:357:4: error: implicit declaration of function '_Unwind_Backtrace' is invalid in C99 [-Werror,-Wimplicit-function-declaration] _Unwind_Backtrace(UtilBacktraceFromPointerCallback, &data); ^ utilBacktrace.c:357:4: note: did you mean 'Util_Backtrace'? /usr/ports/emulators/open-vm-tools-nox11/work/open-vm-tools-10.1.0-4449150/open-vm-tools/lib/include/util.h:130:6: note: 'Util_Backtrace' declared here void Util_Backtrace(int bugNr); ^ 2 errors generated. *** [utilBacktrace.lo] Error code 1 make[4]: stopped in /usr/ports/emulators/open-vm-tools-nox11/work/open-vm-tools-10.1.0-4449150/open-vm-tools/lib/user
(In reply to w.schwarzenfeld from comment #22) What version of FreeBSD are you using?
10.3-RELEASE-amd64-p17.
(In reply to w.schwarzenfeld from comment #24) I can't reproduce that error. I'll send you the full log on my side, can you send my your full log?
Created attachment 180368 [details] open-vm-tools-nox11_build.log
Seems I am not the only: Found this - https://lists.freebsd.org/pipermail/freebsd-virtualization/2017-January/005186.html
(In reply to w.schwarzenfeld from comment #27) Do you have the libunwind package installed and if so, does the error go away if you uninstall it?
Deinstalled libunwind. Now it works, thanks.
The configure script is checks for the presence of the unwind.h header but does not check for the visibility of the needed unwind APIs. Those declaration are there, but bracketed by an "#ifdef _GNU_SOURCE" which means that all GCC language and runtime extensions are supported. I have filed a PR with VMware Tools to: - enhance the usability testing on the unwind.h header - provide a configure option disable/bypass use of libunwind
Created attachment 182032 [details] svn-diff-open-vm-tools
If I am right, the svn-diff should solve the problems.
Obsolete patch. Fix is included update Bug 217485.
This was fixed in r444773.