Can not compile wine on Centos 7 with 64 - x86-64

I trying to compile wine-0.9.1 on CentOS7.
The configure finish okay, I run
./configure --enable-win64
When I run:
'make depend && make'
I get:
make[2]: Entering directory `/../wine-0.9.1/libs/unicode'
gcc -shared -Wl,-soname,libwine_unicode.so.1 -Wl,--version-script=./wine_unicode.map casemap.o collation.o compose.o cptable.o fold.o mbtowc.o sortkey.o string.o utf8.o wctomb.o wctype.o c_037.o c_424.o c_437.o c_500.o c_737.o c_775.o c_850.o c_852.o c_855.o c_856.o c_857.o c_860.o c_861.o c_862.o c_863.o c_864.o c_865.o c_866.o c_869.o c_874.o c_875.o c_878.o c_932.o c_936.o c_949.o c_950.o c_1006.o c_1026.o c_1250.o c_1251.o c_1252.o c_1253.o c_1254.o c_1255.o c_1256.o c_1257.o c_1258.o c_10000.o c_10006.o c_10007.o c_10029.o c_10079.o c_10081.o c_20866.o c_20932.o c_21866.o c_28591.o c_28592.o c_28593.o c_28594.o c_28595.o c_28596.o c_28597.o c_28598.o c_28599.o c_28600.o c_28603.o c_28604.o c_28605.o c_28606.o -o libwine_unicode.so.1
compose.o: In function `lstrcpynW':
/../wine-0.9.1/libs/unicode/../../include/winbase.h:2029: multiple definition of `lstrcpynW'
casemap.o:/../wine-0.9.1/libs/unicode/../../include/winbase.h:2029: first defined here
compose.o: In function `lstrcpynA':
/../wine-0.9.1/libs/unicode/../../include/winbase.h:2044: multiple definition of `lstrcpynA'
casemap.o:/../wine-0.9.1/libs/unicode/../../include/winbase.h:2044: first defined here
compose.o: In function `lstrlenW':
...
/../wine-0.9.1/libs/unicode/../../include/winbase.h:2092: multiple definition of `lstrcatA'
casemap.o:/../wine-0.9.1/libs/unicode/../../include/winbase.h:2092: first defined here
collect2: error: ld returned 1 exit status
make[2]: *** [libwine_unicode.so.1] Error 1
make[2]: Leaving directory `/../wine-0.9.1/libs/unicode'
make[1]: *** [unicode] Error 2
make[1]: Leaving directory `/../wine-0.9.1/libs'
make: *** [libs] Error 2
How can I find what cause the problem?
Thanks.

Related

glib-2.72 build fails with during linking to libglib-2.0.so0.7200.0

*The hardware environment I am working in is a QNAP NAS with x86_64 architecture.
The software is a headless, embedded, QNAP-designed Debian-based Gnu/Linux distro based on kernel 4.14.24.
My current issue is in compiling glib-2.72.0, which uses the meson-ninja system, under Python 3.9.
Compilation runs fine
The ninja build fails at
[150/1259] Linking target glib/libglib-2.0.so.0.7200.0
FAILED: glib/libglib-2.0.so.0.7200.0
when, I think, it attempts to link all the *.c.o files listed in the command below:
cc -o glib/libglib-2.0.so.0.7200.0 glib/libglib-2.0.so.0.7200.0.p/deprecated_gallocator.c.o glib/libglib-2.0.so.0.7200.0.p/deprecated_gcache.c.o glib/libglib-2.0.so.0.7200.0.p/deprecated_gcompletion.c.o glib/libglib-2.0.so.0.7200.0.p/deprecated_grel.c.o glib/libglib-2.0.so.0.7200.0.p/deprecated_gthread-deprecated.c.o glib/libglib-2.0.so.0.7200.0.p/garcbox.c.o glib/libglib-2.0.so.0.7200.0.p/garray.c.o glib/libglib-2.0.so.0.7200.0.p/gasyncqueue.c.o glib/libglib-2.0.so.0.7200.0.p/gatomic.c.o glib/libglib-2.0.so.0.7200.0.p/gbacktrace.c.o glib/libglib-2.0.so.0.7200.0.p/gbase64.c.o glib/libglib-2.0.so.0.7200.0.p/gbitlock.c.o glib/libglib-2.0.so.0.7200.0.p/gbookmarkfile.c.o glib/libglib-2.0.so.0.7200.0.p/gbytes.c.o glib/libglib-2.0.so.0.7200.0.p/gcharset.c.o glib/libglib-2.0.so.0.7200.0.p/gchecksum.c.o glib/libglib-2.0.so.0.7200.0.p/gconvert.c.o glib/libglib-2.0.so.0.7200.0.p/gdataset.c.o glib/libglib-2.0.so.0.7200.0.p/gdate.c.o glib/libglib-2.0.so.0.7200.0.p/gdatetime.c.o glib/libglib-2.0.so.0.7200.0.p/gdir.c.o glib/libglib-2.0.so.0.7200.0.p/genviron.c.o glib/libglib-2.0.so.0.7200.0.p/gerror.c.o glib/libglib-2.0.so.0.7200.0.p/gfileutils.c.o glib/libglib-2.0.so.0.7200.0.p/ggettext.c.o glib/libglib-2.0.so.0.7200.0.p/ghash.c.o glib/libglib-2.0.so.0.7200.0.p/ghmac.c.o glib/libglib-2.0.so.0.7200.0.p/ghook.c.o glib/libglib-2.0.so.0.7200.0.p/ghostutils.c.o glib/libglib-2.0.so.0.7200.0.p/giochannel.c.o glib/libglib-2.0.so.0.7200.0.p/gkeyfile.c.o glib/libglib-2.0.so.0.7200.0.p/glib-init.c.o glib/libglib-2.0.so.0.7200.0.p/glib-private.c.o glib/libglib-2.0.so.0.7200.0.p/glist.c.o glib/libglib-2.0.so.0.7200.0.p/gmain.c.o glib/libglib-2.0.so.0.7200.0.p/gmappedfile.c.o glib/libglib-2.0.so.0.7200.0.p/gmarkup.c.o glib/libglib-2.0.so.0.7200.0.p/gmem.c.o glib/libglib-2.0.so.0.7200.0.p/gmessages.c.o glib/libglib-2.0.so.0.7200.0.p/gnode.c.o glib/libglib-2.0.so.0.7200.0.p/goption.c.o glib/libglib-2.0.so.0.7200.0.p/gpattern.c.o glib/libglib-2.0.so.0.7200.0.p/gpoll.c.o glib/libglib-2.0.so.0.7200.0.p/gprimes.c.o glib/libglib-2.0.so.0.7200.0.p/gqsort.c.o glib/libglib-2.0.so.0.7200.0.p/gquark.c.o glib/libglib-2.0.so.0.7200.0.p/gqueue.c.o glib/libglib-2.0.so.0.7200.0.p/grand.c.o glib/libglib-2.0.so.0.7200.0.p/grcbox.c.o glib/libglib-2.0.so.0.7200.0.p/grefcount.c.o glib/libglib-2.0.so.0.7200.0.p/grefstring.c.o glib/libglib-2.0.so.0.7200.0.p/gregex.c.o glib/libglib-2.0.so.0.7200.0.p/gscanner.c.o glib/libglib-2.0.so.0.7200.0.p/gsequence.c.o glib/libglib-2.0.so.0.7200.0.p/gshell.c.o glib/libglib-2.0.so.0.7200.0.p/gslice.c.o glib/libglib-2.0.so.0.7200.0.p/gslist.c.o glib/libglib-2.0.so.0.7200.0.p/gstdio.c.o glib/libglib-2.0.so.0.7200.0.p/gstrfuncs.c.o glib/libglib-2.0.so.0.7200.0.p/gstring.c.o glib/libglib-2.0.so.0.7200.0.p/gstringchunk.c.o glib/libglib-2.0.so.0.7200.0.p/gstrvbuilder.c.o glib/libglib-2.0.so.0.7200.0.p/gtestutils.c.o glib/libglib-2.0.so.0.7200.0.p/gthread.c.o glib/libglib-2.0.so.0.7200.0.p/gthreadpool.c.o glib/libglib-2.0.so.0.7200.0.p/gtimer.c.o glib/libglib-2.0.so.0.7200.0.p/gtimezone.c.o glib/libglib-2.0.so.0.7200.0.p/gtrace.c.o glib/libglib-2.0.so.0.7200.0.p/gtranslit.c.o glib/libglib-2.0.so.0.7200.0.p/gtrashstack.c.o glib/libglib-2.0.so.0.7200.0.p/gtree.c.o glib/libglib-2.0.so.0.7200.0.p/guniprop.c.o glib/libglib-2.0.so.0.7200.0.p/gutf8.c.o glib/libglib-2.0.so.0.7200.0.p/gunibreak.c.o glib/libglib-2.0.so.0.7200.0.p/gunicollate.c.o glib/libglib-2.0.so.0.7200.0.p/gunidecomp.c.o glib/libglib-2.0.so.0.7200.0.p/guri.c.o glib/libglib-2.0.so.0.7200.0.p/gutils.c.o glib/libglib-2.0.so.0.7200.0.p/guuid.c.o glib/libglib-2.0.so.0.7200.0.p/gvariant.c.o glib/libglib-2.0.so.0.7200.0.p/gvariant-core.c.o glib/libglib-2.0.so.0.7200.0.p/gvariant-parser.c.o glib/libglib-2.0.so.0.7200.0.p/gvariant-serialiser.c.o glib/libglib-2.0.so.0.7200.0.p/gvarianttypeinfo.c.o glib/libglib-2.0.so.0.7200.0.p/gvarianttype.c.o glib/libglib-2.0.so.0.7200.0.p/gversion.c.o glib/libglib-2.0.so.0.7200.0.p/gwakeup.c.o glib/libglib-2.0.so.0.7200.0.p/gprintf.c.o glib/libglib-2.0.so.0.7200.0.p/glib-unix.c.o glib/libglib-2.0.so.0.7200.0.p/gspawn.c.o glib/libglib-2.0.so.0.7200.0.p/giounix.c.o glib/libglib-2.0.so.0.7200.0.p/gthread-posix.c.o
-L/opt/lib -Wl,--no-undefined -shared -fPIC -Wl,--start-group -Wl,-soname,libglib-2.0.so.0 glib/libcharset/libcharset.a subprojects/pcre-8.37/libpcre.a -Wl,-z,nodelete -Wl,-Bsymbolic-functions -pthread -liconv -lm -Wl,--end-group
/opt/bin/ld: glib/libglib-2.0.so.0.7200.0.p/ggettext.c.o: in function `_g_dgettext_should_translate':
/share/CACHEDEV1_DATA/jmarks/gdk_files/glib-2.72.0/_build/../glib/ggettext.c:315: undefined reference to `libintl_textdomain'
/opt/bin/ld: /share/CACHEDEV1_DATA/jmarks/gdk_files/glib-2.72.0/_build/../glib/ggettext.c:316: undefined reference to `libintl_gettext'
/opt/bin/ld: glib/libglib-2.0.so.0.7200.0.p/ggettext.c.o: in function `ensure_gettext_initialized':
/share/CACHEDEV1_DATA/jmarks/gdk_files/glib-2.72.0/_build/../glib/ggettext.c:107: undefined reference to `libintl_bindtextdomain'
/opt/bin/ld: /share/CACHEDEV1_DATA/jmarks/gdk_files/glib-2.72.0/_build/../glib/ggettext.c:110: undefined reference to `libintl_bind_textdomain_codeset'
/opt/bin/ld: glib/libglib-2.0.so.0.7200.0.p/ggettext.c.o: in function `g_dgettext':
/share/CACHEDEV1_DATA/jmarks/gdk_files/glib-2.72.0/_build/../glib/ggettext.c:402: undefined reference to `libintl_dgettext'
/opt/bin/ld: /share/CACHEDEV1_DATA/jmarks/gdk_files/glib-2.72.0/_build/../glib/ggettext.c:402: undefined reference to `libintl_dgettext'
/opt/bin/ld: glib/libglib-2.0.so.0.7200.0.p/ggettext.c.o: in function `g_dcgettext':
/share/CACHEDEV1_DATA/jmarks/gdk_files/glib-2.72.0/_build/../glib/ggettext.c:429: undefined reference to `libintl_dcgettext'
/opt/bin/ld: /share/CACHEDEV1_DATA/jmarks/gdk_files/glib-2.72.0/_build/../glib/ggettext.c:429: undefined reference to `libintl_dcgettext'
/opt/bin/ld: glib/libglib-2.0.so.0.7200.0.p/ggettext.c.o: in function `g_dngettext':
/share/CACHEDEV1_DATA/jmarks/gdk_files/glib-2.72.0/_build/../glib/ggettext.c:460: undefined reference to `libintl_dngettext'
/opt/bin/ld: /share/CACHEDEV1_DATA/jmarks/gdk_files/glib-2.72.0/_build/../glib/ggettext.c:460: undefined reference to `libintl_dngettext'
collect2: error: ld returned 1 exit status
Is this is an issue with gettext?
All the *.c.o files in the failed command exist in the correct directory.
The prefix=/opt
Gettext 0.21 is installed.
gettext.h is located in /opt/share/gettext/ and this path is included in CFLAGS and CPPFLAGS
libintl.a is in opt/lib as is its shared library:
# ldconfig -v |grep libintl
libintl.so.8 -> libintl.so.8.2.0
I would like to learn why this is failing and how to fix it.
Many thanks

Is there any patches for tegra-minimal-initramfs.bb to prevent this error?

I was trying to build core-image-minimal for Jetson TX2 following the instructions from this link
https://developer.ridgerun.com/wiki/index.php?title=Yocto_Support_for_NVIDIA_Jetson_Platforms-Old .
My build configuration is
Build Configuration:
BB_VERSION = "1.46.0"
BUILD_SYS = "x86_64-linux"
NATIVELSBSTRING = "universal"
TARGET_SYS = "aarch64-poky-linux"
MACHINE = "jetson-tx2"
DISTRO = "poky"
DISTRO_VERSION = "3.1.5"
TUNE_FEATURES = "aarch64 armv8a crc"
TARGET_FPU = ""
meta-tegra = "dunfell-l4t-r32.4.3:3b4df1ac05e9f96e0363630c036f5445800af435"
meta
meta-poky
meta-yocto-bsp = "dunfell:6e89d668246fb37b2217aae7ae57390e793696d8"
But I got this error related to tegra-minimal-initramfs recipe.
WARNING: tegra-minimal-initramfs-1.0-r0 do_image_complete: KeyError in .
ERROR: tegra-minimal-initramfs-1.0-r0 do_image_complete: Error executing a python function in exec_python_func() autogenerated:
The stack trace of python calls that resulted in this exception/failure was:
File: 'exec_python_func() autogenerated', lineno: 2, function: <module>
0001:
*** 0002:sstate_report_unihash(d)
0003:
File: '/home/pc_1175/yocto-tegra/poky-dunfell/meta/classes/sstate.bbclass', lineno: 844, function: sstate_report_unihash
0840: report_unihash = getattr(bb.parse.siggen, 'report_unihash', None)
0841:
0842: if report_unihash:
0843: ss = sstate_state_fromvars(d)
*** 0844: report_unihash(os.getcwd(), ss['task'], d)
0845:}
0846:
0847:#
0848:# Shell function to decompress and prepare a package for installation
File: '/home/pc_1175/yocto-tegra/poky-dunfell/bitbake/lib/bb/siggen.py', lineno: 555, function: report_unihash
0551:
0552: if "." in self.method:
0553: (module, method) = self.method.rsplit('.', 1)
0554: locs['method'] = getattr(importlib.import_module(module), method)
*** 0555: outhash = bb.utils.better_eval('method(path, sigfile, task, d)', locs)
0556: else:
0557: outhash = bb.utils.better_eval(self.method + '(path, sigfile, task, d)', locs)
0558:
0559: try:
File: '/home/pc_1175/yocto-tegra/poky-dunfell/bitbake/lib/bb/utils.py', lineno: 420, function: better_eval
0416: if extraglobals:
0417: ctx = copy.copy(ctx)
0418: for g in extraglobals:
0419: ctx[g] = extraglobals[g]
*** 0420: return eval(source, ctx, locals)
0421:
0422:#contextmanager
0423:def fileslocked(files):
0424: """Context manager for locking and unlocking file locks."""
File: '<string>', lineno: 1, function: <module>
File "<string>", line 1, in <module>
File: '/home/pc_1175/yocto-tegra/poky-dunfell/meta/lib/oe/sstatesig.py', lineno: 593, function: OEOuthashBasic
0589:
0590: update_hash("\n")
0591:
0592: # Process this directory and all its child files
*** 0593: process(root)
0594: for f in files:
0595: if f == 'fixmepath':
0596: continue
0597: process(os.path.join(root, f))
File: '/home/pc_1175/yocto-tegra/poky-dunfell/meta/lib/oe/sstatesig.py', lineno: 553, function: process
0549: add_perm(stat.S_IXOTH, 'x')
0550:
0551: if include_owners:
0552: try:
*** 0553: update_hash(" %10s" % pwd.getpwuid(s.st_uid).pw_name)
0554: update_hash(" %10s" % grp.getgrgid(s.st_gid).gr_name)
0555: except KeyError:
0556: bb.warn("KeyError in %s" % path)
0557: raise
Exception: KeyError: 'getpwuid(): uid not found: 1000'
ERROR: Logfile of failure stored in: /home/pc_1175/yocto-tegra/build/tmp/work/jetson_tx2-poky-linux/tegra-minimal-initramfs/1.0-r0/temp/log.do_image_complete.23961
ERROR: Task (/home/pc_1175/yocto-tegra/meta-tegra/recipes-core/images/tegra-minimal-initramfs.bb:do_image_complete) failed with exit code '1'
The problem is that I have built the same image before with the same packages and I didn't get this error.
When I added TEGRA_INITRAMFS_INITRD = "0" to local.conf file I didn't get this error but I'm wondering if it can affect my system.
TLDR;
Just clean image recipe working directory with bitbake -c cleansstate tegra-minimal-initramfs and also bitbake -c cleansstate core-image-minimal just in case. Than build should work, but it may be not reproducible. That is, maybe you'll have to call this two cleansstate commands before building images (tegra-minimal-initramfs and core-image-minimal) every time.
I got same issue when migrated my project (not connected with Tegra) to Yocto 3.2. The issue was with pseudo - it is a fakeroot-tool, that is used in Yocto for generating rootfs with right files permissions (you run bitbake as an ordinary user, not root, but get rootfs with all files belonging to root). Here is bug i've posted with my patch.
But you are using Yocto 3.1.5 as i see, so your issue is different. The core reason is that during some package build (the one that was excluded by TEGRA_INITRAMFS_INITRD = "0") pseudo remembered, that some file should belong to user 1000, but during building tegra-minimal-initramfs (generation of initramfs) user 1000 was not found in initramfs itself... because there are only root and some basic Linux users.
To your question, may anything break if you leave TEGRA_INITRAMFS_INITRD = "0". Likely yes. Here is where this variable is applied. It is used during U-Boot build and looks like it turns off initramfs usage at all. So with TEGRA_INITRAMFS_INITRD = "0" your final image wouldn't include initramfs file. If the device has some fallback mechanism to boot without initramfs, seems you are ok. If not - try cleansstate.

Bad substitution using sh

I have the following script and I'm getting the following error: Error: Bad substitution
value="$(cat temp.txt)"
valueWOBegin="$(echo ${value/*====BUILDTYPES====/})"
valueWOEnd="$(echo ${valueWOBegin/====END BUILDTYPES====*/})"
This is the temp.txt file
====BUILDTYPES==== [BuildType_Decorated{name=debug, debuggable=true, testCoverageEnabled=false, jniDebuggable=false,
pseudoLocalesEnabled=false, renderscriptDebuggable=false,
renderscriptOptimLevel=3, minifyEnabled=false, zipAlignEnabled=true,
signingConfig=SigningConfig_Decorated{name=debug,
storeFile=/mypath/debug.keystore, storePassword=android,
keyAlias=AndroidDebugKey, keyPassword=android, storeType=jks,
v1SigningEnabled=true, v2SigningEnabled=true,
v1SigningConfigured=false, v2SigningConfigured=false},
embedMicroApp=false, mBuildConfigFields={}, mResValues={},
mProguardFiles=[], mConsumerProguardFiles=[],
mManifestPlaceholders={}}, BuildType_Decorated{name=release,
debuggable=false, testCoverageEnabled=false, jniDebuggable=false,
pseudoLocalesEnabled=false, renderscriptDebuggable=false,
renderscriptOptimLevel=3, minifyEnabled=true, zipAlignEnabled=true,
signingConfig=null, embedMicroApp=true, mBuildConfigFields={},
mResValues={},
mProguardFiles=[/mypath/proguard-rules.pro],
mConsumerProguardFiles=[], mManifestPlaceholders={}}]
====END BUILDTYPES====

LLD vs LD Linker Script Discrepancy

I'm moving a project from LD to LLD. An error has cropped up which appears due to the lack of global expression support in LLD. Are variables supported like this?
An simplified example of something that works in LD:
example.ld
_Flash_Origin = 0x01000000;
_App_Length = 16K;
_App_Origin = _Flash_Origin;
MEMORY
{
APP(rx) : ORIGIN = _App_Origin, LENGTH = _App_Length
}
The error is symbol not found: _App_Length. I'm looking for the reason this occurs only in LLD.
The args provided are as follows:
--gc-sections (list of object files...) -Bstatic -L(big path...)clang/10.0.1/lib/baremetal -T example.ld -T sections.ld -o output.elf

Error while compiling Ethos framework

I'm trying make Ethos framework on Mac OS Lion.
git://git.dronelabs.com/ethos
Here result of ./configure:
Ethos 0.2.3
Prefix...................: /usr/local
Debug level..............: minimum
Maintainer Compiler flags: no
Build API reference......: no
Enable test suite........: yes
Bindings
GObject Introspection....: no
Vala Bindings............: no
Python Bindings..........: no
Javascript Bindings......: no
Now type `make' to compile ethos
Then I do sudo make, and while compiling arise an error:
Making all in c-plugins
CC libsample.so
Undefined symbols for architecture x86_64:
"_ethos_plugin_get_type", referenced from:
_my_plugin_get_type in cc3gPLKS.o
_my_plugin_class_init in cc3gPLKS.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
make[3]: *** [libsample.so] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
How can I fix it?
I found that Ethos can be installed on Mac OS X 10.7 after the following modifications:
1)Edit file: ethos_dir/ethos/ethos_manager.c (:194):
FROM:
while (NULL != (filename = g_dir_read_name (dir))) {
if (g_str_has_suffix (filename, "." G_MODULE_SUFFIX)) {
abspath = g_build_filename (loaders_dir, filename, NULL);
loader = ethos_manager_create_plugin_loader (manager, abspath);
if (loader != NULL)
loaders = g_list_prepend (loaders, loader);
g_free (abspath);
}
}
TO:
while (NULL != (filename = g_dir_read_name (dir))) {
#ifdef __APPLE__
gchar* suffix = "dylib"; // to able find ethos-plugin-loader
#else
gchar* suffix = ("." G_MODULE_SUFFIX);
#endif
if (g_str_has_suffix (filename, suffix)) {
abspath = g_build_filename (loaders_dir, filename, NULL);
loader = ethos_manager_create_plugin_loader (manager, abspath);
if (loader != NULL)
loaders = g_list_prepend (loaders, loader);
g_free (abspath);
}
}
2)Disable making for: ethos-dir/tests,
Change in Makefile.am
FROM:
line#: contents
02: SUBDIRS = c-plugins manager-dep
30: manager_sources = manager.c
31: plugin_info_sources = plugin-info.c
TO:
02: #SUBDIRS = c-plugins manager-dep
30: #manager_sources = manager.c
31: #plugin_info_sources = plugin-info.c
This is necessary because, while making process it cannot find libethos.