"winecfg" and "wineserver" commands are missing

Questions about Wine on Linux
User avatar
Bob Wya
Level 12
Level 12
Posts: 3068
Joined: Sat Oct 16, 2010 7:40 pm

Re: "winecfg" and "wineserver" commands are missing

Post by Bob Wya »

Hiya,

Sorry 'bout that! Nice catch... :wink:
I wouldn't have thought the CXXFLAGS variable (that's more for C++ compiler flags) would get used for Wine though... :?

That output is useful though. The host and build options aren't going to work on Slackware (I think they're just aliases to the 64-bit gcc compiler with the -m32 flag - on Gentoo).

So try really forcing the -m32 compiler flag all over the place(!!) :

Code: Select all

mkdir -pv /tmp/build/wine
cd /tmp/build/wine
mkdir -v wine{64,32}-build
WINE_ARCHIVE="wine-1.8.1.tar.bz2"
WINE_OPTIONS="--with-alsa --without-capi --with-cms --with-coreaudio --without-cups --with-curses --with-dbus --with-fontconfig --with-freetype --with-gettext --without-gettextpo --without-gphoto --with-glu --with-gnutls --without-gsm --without-gstreamer --without-hal --with-jpeg --without-ldap --without-mpg123 --with-netapi --without-openal --without-opencl --with-opengl --with-osmesa --with-oss --with-pcap --with-png --with-pthread --without-pulse --without-sane --without-tiff --with-v4l --with-xcomposite --with-xcursor --with-xinerama --with-xinput --with-xinput2 --with-xml --with-xrandr --with-xrender --with-xshape --with-xshm --with-xslt --with-xxf86vm --with-zlib --with-x"
WINE_SRC_DIR=$(tar --exclude '*/*' -taf "${WINE_ARCHIVE}")
tar xvf "${WINE_ARCHIVE}"
for ARCH in "m32" "m64"; do
        sed -i '/CXX="\$CXX -'"${ARCH}"'"/a \
      CFLAGS="$CFLAGS -'"${ARCH}"'"\
      LDFLAGS="$LDFLAGS -'"${ARCH}"'"\
      CXXFLAGS="$CXXFLAGS -'"${ARCH}"'"' "${WINE_SRC_DIR}/configure.ac"
done
unset -v ARCH
pushd wine64-build
CFLAGS="-O2 -fPIC" CXXFLAGS="-O2 -fPIC" ../${WINE_SRC_DIR}/configure --prefix=/usr --enable-win64 ${WINE_OPTIONS}
make
popd
pushd wine32-build
CFLAGS="-O2 -fPIC -m32" CXXFLAGS="-O2 -fPIC -m32" LDFLAGS="-m32" ../${WINE_SRC_DIR}/configure --prefix=/usr --libdir=/usr/lib --with-wine64=../wine64-build ${WINE_OPTIONS}
make
make install DESTDIR=/tmp/${WINE_SRC_DIR}
popd
pushd wine64-build
make install DESTDIR=/tmp/${WINE_SRC_DIR}
popd
Ta
Bob
User avatar
YuGiOhJCJ
Level 2
Level 2
Posts: 19
Joined: Tue Aug 19, 2014 6:09 pm

Re: "winecfg" and "wineserver" commands are missing

Post by YuGiOhJCJ »

Done:

Code: Select all

$ mkdir -pv /tmp/build/wine
$ cd /tmp/build/wine
$ mkdir -v wine{64,32}-build
$ WINE_ARCHIVE="wine-1.8.1.tar.bz2"
$ WINE_OPTIONS="--with-alsa --without-capi --with-cms --with-coreaudio --without-cups --with-curses --with-dbus --with-fontconfig --with-freetype --with-gettext --without-gettextpo --without-gphoto --with-glu --with-gnutls --without-gsm --without-gstreamer --without-hal --with-jpeg --without-ldap --without-mpg123 --with-netapi --without-openal --without-opencl --with-opengl --with-osmesa --with-oss --with-pcap --with-png --with-pthread --without-pulse --without-sane --without-tiff --with-v4l --with-xcomposite --with-xcursor --with-xinerama --with-xinput --with-xinput2 --with-xml --with-xrandr --with-xrender --with-xshape --with-xshm --with-xslt --with-xxf86vm --with-zlib --with-x"
$ WINE_SRC_DIR=$(tar --exclude '*/*' -taf "${WINE_ARCHIVE}")
$ tar xvf "${WINE_ARCHIVE}"
$ for ARCH in "m32" "m64"; do
>         sed -i '/CXX="\$CXX -'"${ARCH}"'"/a \
>       CFLAGS="$CFLAGS -'"${ARCH}"'"\
>       LDFLAGS="$LDFLAGS -'"${ARCH}"'"\
>       CXXFLAGS="$CXXFLAGS -'"${ARCH}"'"' "${WINE_SRC_DIR}/configure.ac"
> done
$ unset -v ARCH
$ cd wine64-build
$ CFLAGS="-O2 -fPIC" CXXFLAGS="-O2 -fPIC" ../${WINE_SRC_DIR}/configure --prefix=/usr --enable-win64 ${WINE_OPTIONS}
$ make
$ cd -
$ cd wine32-build
$ CFLAGS="-O2 -fPIC -m32" CXXFLAGS="-O2 -fPIC -m32" LDFLAGS="-m32" ../${WINE_SRC_DIR}/configure --prefix=/usr --libdir=/usr/lib --with-wine64=../wine64-build ${WINE_OPTIONS}
$ make
$ make install DESTDIR=/tmp/${WINE_SRC_DIR}
$ cd -
$ cd wine64-build
$ make install DESTDIR=/tmp/${WINE_SRC_DIR}
$ cd -
The full log is here: http://yugiohjcj.free.fr/wine-20161204-2.txt.

When I am running clock with the 32-bit wine, I still have a problem:

Code: Select all

$ sudo sysctl vm.mmap_min_addr=0
vm.mmap_min_addr = 0
$ wine clock.exe 
wine: Unhandled page fault on read access to 0x00000048 at address 0x7e42c4b4 (thread 0027), starting debugger...
err:seh:start_debugger Couldn't start debugger ("winedbg --auto 38 88") (2)
Read the Wine Developers Guide on how to set up winedbg or another debugger
But no problem with the 64-bit wine:

Code: Select all

$ wine64 clock.exe
User avatar
Bob Wya
Level 12
Level 12
Posts: 3068
Joined: Sat Oct 16, 2010 7:40 pm

Re: "winecfg" and "wineserver" commands are missing

Post by Bob Wya »

You didn't mention... But what version of gcc are you using to build Wine?

Ta
Bob
User avatar
Bob Wya
Level 12
Level 12
Posts: 3068
Joined: Sat Oct 16, 2010 7:40 pm

Re: "winecfg" and "wineserver" commands are missing

Post by Bob Wya »

@YuGiOhJCJ,

I had a look back over the older post - where you list the contents of your wine 1.8.1 package...

I can't help but notice that you are totally missing any debug symbols for your Wine libraries... That's probably not going to help the troubleshooting process very much!

My current app-emulation/wine package contents ...

So I think that would be next angle - to try to fix!
Bob
studiosg
Newbie
Newbie
Posts: 1
Joined: Tue Dec 06, 2016 4:42 am

Re: "winecfg" and "wineserver" commands are missing

Post by studiosg »

I'll try to help if I can.

Some dumb questions to make me better understand the scenario:

What's your goal ? From logs attached to earlier posts I thought you were trying to build wine 1.8.1 for Slackware64 14.2 with OpenAL support. OpenAL is not part of the official Slackware package tree and as such OpenAL support is not available in the package from SourceForge. In later posts OpenAL was explicitly disabled when configuring the source code and that let me wondering.

Have you tried the build script available in every SourceForge package ? It's located in /usr/doc/wine-<version>/wine.SlackBuild.
You should probably edit it to disable FontForge support and RequireBuilder:
REQUIRE_FONTFORGE=${REQUIRE_FONTFORGE:-"NO"}
REQUIREDBUILDER_USE=${REQUIREDBUILDER_USE:-"NO"}
I was able to build a working Wine 1.8.1 package for Slackware64 14.2. I tested both the 32 and 64 bit 7Zip exe and they worked just fine.

Why did you build 32 bit packages for all of Wine dependencies ? "Official" compat32 packages are available from http://www.slackware.com/~alien/multili ... -compat32/ ? The packages contain all of the 32 bit parts needed to execute 32 bit code in a multilib environment. You don't need to install a full 32 bit package. Only the 64 bit package and the corresponding compat-32 one (http://www.slackware.com/~alien/multilib/).

I'll suggest a step by step approach:
1) Start from a clean Slackware64 install.
2) Install multilib glibc, gcc and compat32-tools packages to add support for 32 bit binary files.
3) Add compat32 packages. Alien Bob's repository should contain everything you need to build a working Wine.
4) If you don't need any extra dependencies nor a specific Wine version, I'll try to install a recent package (1.8.5 from https://sourceforge.net/projects/wine/f ... 0Packages/) first and see if it works.
5) Build a Wine package with the standard SlackBuild script and test it with 7Zip or another program known to work with Wine.
6) If you need debug symbols comment out the lines containing the strip command:
# Strip binaries
#find ${PKG} | xargs file | grep -e "executable" -e "shared object" \
# | grep ELF | cut -f 1 -d: | xargs strip --strip-unneeded 2> /dev/null

I hope this helps.

Cheers
Simone
User avatar
YuGiOhJCJ
Level 2
Level 2
Posts: 19
Joined: Tue Aug 19, 2014 6:09 pm

Re: "winecfg" and "wineserver" commands are missing

Post by YuGiOhJCJ »

What's your goal ? From logs attached to earlier posts I thought you were trying to build wine 1.8.1 for Slackware64 14.2 with OpenAL support. OpenAL is not part of the official Slackware package tree and as such OpenAL support is not available in the package from SourceForge. In later posts OpenAL was explicitly disabled when configuring the source code and that let me wondering.
My goal is to check if Wine is easy or not to be built on a 64-bit operating system (nothing more).
If you check my first post, I used the "--without-openal" option so I am not trying to enable this option.
Have you tried the build script available in every SourceForge package ? It's located in /usr/doc/wine-<version>/wine.SlackBuild.
You should probably edit it to disable FontForge support and RequireBuilder:
REQUIRE_FONTFORGE=${REQUIRE_FONTFORGE:-"NO"}
REQUIREDBUILDER_USE=${REQUIREDBUILDER_USE:-"NO"}
I was able to build a working Wine 1.8.1 package for Slackware64 14.2. I tested both the 32 and 64 bit 7Zip exe and they worked just fine.
I don't like SlackBuilds because they require to be root whereas a lot of things can be done as a simple user.
I prefer to use my own scripts that are based on a SlackBuild.
I have not yet tried the build script available in every SourceForge package.
I will try it.

Code: Select all

Why did you build 32 bit packages for all of Wine dependencies ? "Official" compat32 packages are available from http://www.slackware.com/~alien/multili ... -compat32/ ? The packages contain all of the 32 bit parts needed to execute 32 bit code in a multilib environment. You don't need to install a full 32 bit package. Only the 64 bit package and the corresponding compat-32 one (http://www.slackware.com/~alien/multilib/).
I always install a base system with "official" pre-built binary packages but each time I need a new open-source program, I take the time to build it through my own script.
That's how I am using my system.
The compat32 packages are not "official" because Slackware64 does not support multilib officially.
So, I am building all these new open-source programs myself, following my rules.
However, I don't respect my rules completely because I use the following non-official pre-built binary packages:
  • gcc-g++-5.3.0_multilib-x86_64-3alien
  • gcc-gfortran-5.3.0_multilib-x86_64-3alien
  • gcc-gnat-5.3.0_multilib-x86_64-3alien
  • gcc-go-5.3.0_multilib-x86_64-3alien
  • gcc-java-5.3.0_multilib-x86_64-3alien
  • gcc-objc-5.3.0_multilib-x86_64-3alien
  • glibc-2.23_multilib-x86_64-1alien
  • glibc-i18n-2.23_multilib-x86_64-1alien
  • glibc-profile-2.23_multilib-x86_64-1alien
  • glibc-solibs-2.23_multilib-x86_64-1alien
Indeed, when it's a pain in the ass to build some open-source programs, I have no choice.

I don't like your suggested step by step approach.
It requires to clean my Slackware64 operating system and I can't clean my operating system currently because it is used.
Also, installing all the compat32 pre-built binary packages does not respect my rules.
Finally, using a SlackBuild is not what I want to do.

Thanks for the support but I will try some other solutions.
Locked