Problem with make separate cross-dll

Questions about Wine on Linux
Locked
Loooooker
Level 1
Level 1
Posts: 5
Joined: Mon Jul 22, 2013 5:29 am

Problem with make separate cross-dll

Post by Loooooker »

From time to time I cross-compile some dlls as described here: http://wiki.winehq.org/WineD3DOnWindows

but from version 1.7.4 compiler breaks with error. I found problematic commit: http://source.winehq.org/git/wine.git/c ... 962bc2912e
separate dlls won't compile after changes in file Makedll.rules.in

But in version 1.7.5 this file have been deleted already? so command like

Code: Select all

make -C dlls/winecrt0
breaks with error:

Code: Select all

make: *** No rule to make target `../../include/wtypes.h', needed by `register.o'.  Stop.
Maybe now I must run make or configure with some params or is this a bug?
Please help.
oiaohm
Level 8
Level 8
Posts: 1020
Joined: Fri Feb 29, 2008 2:54 am

Re: Problem with make separate cross-dll

Post by oiaohm »

Loooooker I am very suspect you have make a minor mistake.

Code: Select all

make depend
make libs
make -C libs/port
make -C libs/wine
make -C dlls/winecrt0
make -C dlls/wined3d
make -C dlls/d3d8
make -C dlls/d3d9
make -C dlls/dxguid
make -C dlls/dxgi
make -C dlls/d3d10core
make -C dlls/d3d10
The order here is not some random choice.

make -C dlls/winecrt0 cannot work I know for sure if make depend and make libs is not performed. I am also fairly sure make -C libs/port and make -C libs/wine also have to be run. After that you can choose libraries. Particular environmental things have to be set-up for wine to build.

Loooooker its been long time since I have used this feature for cross building. I have been at times rebuilding individual .dll.so files. Yes there is so much setup required.\

Loooooker if the script on the WineD3DOnWindows fails then you have a bug. If it works you don't have a bug.

Yes wine is meant to be able to cross build if it cannot we have a regression. I don't know if 1.7.5 would have a fix to 1.7.4 issue.
Loooooker
Level 1
Level 1
Posts: 5
Joined: Mon Jul 22, 2013 5:29 am

Re: Problem with make separate cross-dll

Post by Loooooker »

oiaohm, big thanks for attention!
Here is my script:

Code: Select all

set -ex
unset CC
rm -rf wine-tools wine-win32
mkdir -p wine-tools
cd wine-tools
/home/romawk/wine/configure --without-x --without-freetype
make __tooldeps__
cd ..
mkdir -p wine-win32
cd wine-win32
/home/romawk/wine/configure --without-x --without-freetype --host=i686-w64-mingw32 --target=mingw32 CFLAGS="-O2 -DWINE_NOWINSOCK -DUSE_WIN32_OPENGL" --with-wine-tools=/home/romawk/wine-tools/
make depend
make libs
make -C libs/port
make -C libs/wine
make -C dlls/winecrt0
make -C dlls/wined3d
make -C dlls/dxguid
make -C dlls/ddraw
mkdir -p crossdlls
cp dlls/ddraw/ddraw.dll dlls/wined3d/wined3d.dll libs/wine/libwine.dll crossdlls/
It works perfectly for versions 1.4-1.7.3
After changes in file /dlls/Makedll.rules.in in the commit http://source.winehq.org/git/wine.git/c ... 962bc2912e
dlls stopped to build. Deleting this code lead to that:

Code: Select all

IMPLIB_OBJS = $(IMPLIB_SRCS:.c=.o)
IMPLIBFLAGS = $(TARGETFLAGS) $(EXTRAIMPLIBFLAGS)
IMPORTLIBFILE = $(IMPORTLIB:%=lib%.@IMPLIBEXT@)
STATICIMPLIB  = $(IMPORTLIBFILE:.def=.def.a)

# Rules for import libraries

IMPLIB_CROSSOBJS = $(IMPLIB_OBJS:.o=.cross.o)

.PHONY: $(IMPLIB_SRCS:%=__static_implib__%)

all: $(IMPORTLIBFILE) $(IMPLIB_SRCS:%=__static_implib__%) @CROSSTEST_DISABLE@ $(IMPORTLIB:%=lib%.cross.a)

$(IMPLIB_SRCS:%=__static_implib__%): $(STATICIMPLIB)
But in the commit
http://source.winehq.org/git/wine.git/c ... e03af7ff9e
the file /dlls/Makedll.rules.in have been deleted at all!
As says comdiff of this commit, the file Makedll.rules.in must be created from file /tools/make_makefiles , but how can I do that??
oiaohm
Level 8
Level 8
Posts: 1020
Joined: Fri Feb 29, 2008 2:54 am

Re: Problem with make separate cross-dll

Post by oiaohm »

Loooooker I am not a master of build systems. But this class of problem is bad enough to open a bug report and talk in #winehackers channel on freenode irc with Alexandre Julliard himself.

Yes this is a feature that should work but is now broken.
Loooooker
Level 1
Level 1
Posts: 5
Joined: Mon Jul 22, 2013 5:29 am

Re: Problem with make separate cross-dll

Post by Loooooker »

OK, Alexandre makes corrections in Wiki.
Locked