[jitsi-dev] Jitsi installer build fails on executing makefile


#1

Hi,
I have made all the required steps for making the installer. which
mentioned over here;

http://java.net/projects/jitsi/lists/dev/archive/2011-07/message/173

However I am getting the following error when I try to build;

[exec] Makefile:46: *** target pattern contains no `%'. Stop.

I have no knowledge of C/C++, I have searched on google to find some
solution only thing I found is related to the path of the files,
however I have tried different path names also restore everything from
repository again but there is no luck.

I also try to build with cygwin which I get similar result.

Beside that project works completly fine.

Thank a lot,
mafiosi


#2

Which makefile is affected? (run? setup? cleansweep? Should be noted a few lines before the failure)

Have you applied the patchset that was included in the referenced message?
And after all: that compilation of steps was just to prove myself that I'm able to generate an installer and by no means an official set of instructions :slight_smile:

Ingo

···

-----Original Message-----
From: nts.mafiosi@hotmail.co.uk [mailto:nts.mafiosi@hotmail.co.uk]
Sent: Montag, 29. August 2011 10:04
To: dev@jitsi.java.net
Subject: [jitsi-dev] Jitsi installer build fails on executing makefile
Hi,
I have made all the required steps for making the installer. which
mentioned over here;

http://java.net/projects/jitsi/lists/dev/archive/2011-07/message/173

However I am getting the following error when I try to build;

[exec] Makefile:46: *** target pattern contains no `%'. Stop.

I have no knowledge of C/C++, I have searched on google to find some
solution only thing I found is related to the path of the files,
however I have tried different path names also restore everything from
repository again but there is no luck.

I also try to build with cygwin which I get similar result.

Beside that project works completly fine.

Thank a lot,
mafiosi


#3

Hi,
thanks a lot, I really appreciate it.
I have not seen the attachment, and all the times I was referring the
mails and reading over and over again for finding what I have missed.
Nevertheless I have patch the files, run and cleansweep are now working
however setup doesn't . I debuged and gives me the following output;

  [exec] Batch file contents:
     [exec] @echo off
     [exec] echo #undef PACKAGESIZE >>
C:\Users\\workspace\jitsi/release/windows/tmp/config.hgwin.tar
get.dir)/config.h
     [exec] echo #undef PACKAGESIZE >>
C:\Users\\workspace\jitsi/release/windows/tmp/config.hgwin.tar
get.dir)/config.h
     [exec]
CreateProcess(C:\Users\\AppData\Local\Temp\make6716-1.bat,C:\U
sers\DEV-EN~1\AppData\Local\Temp\make6716-1.bat,...)
     [exec] Live child 0x3fa398
(C:\Users\\workspace\jitsi/release/windows/tmp/config.h) PID
4744960
     [exec] The system can not find the path specified.
     [exec] Reaping losing child 0x3fa398 PID 4744960
     [exec] Cleaning up temp batch file
C:\Users\\AppData\Local\Temp\make6716-1.bat
     [exec] make.exe: ***
[C:\Users\\workspace\jitsi/release/windows/tmp/config.h] Error
1
     [exec] Removing child 0x3fa398 PID 4744960 from chain.
     [exec] Result: 2

Here is the makefile;
src/native/windows/setup/Makefile;

···

#
# Jitsi, the OpenSource Java VoIP and Instant Messaging client.
#
# Distributable under LGPL license.
# See terms of license at gnu.org.
#

BZ2_HOME ?= .
LZMA_HOME ?= .
MINGW_HOME ?= C:/mingw
PRODUCTNAME ?= Jitsi
TARGET_BASENAME ?= setup
TARGET_DIR ?= ../../../../release/windows/tmp

ifeq ($(wildcard /bin/cygpath.*),/bin/cygpath.exe)
    target.dir := $(shell cygpath --mixed "$(TARGET_DIR)")
    cygwin.target.dir := $(shell cygpath --unix "$(TARGET_DIR)")
else
    target.dir := "$(TARGET_DIR)"
    cygwin.target.dir := $(TARGET_DIR)
endif

CC = $(MINGW_HOME)/bin/gcc.exe
ARCH = $(PROCESSOR_ARCHITECTURE)

CPPFLAGS = \
  -O2 \
  -Wall -Wreturn-type \
  -DWINVER=0x0502 -D_WIN32_WINNT=0x0502 \
  -I$(target.dir) \
  -static \
  -DBSPATCH_API_STATIC -DBZ2_API_STATIC -I. -I$(BZ2_HOME)/include
-I$(BZ2_HOME) \
  -DLZMA_API_STATIC -I$(LZMA_HOME)/include -I$(LZMA_HOME)/api \
  -I../run
LDFLAGS = \
  -mwindows \
  -L$(BZ2_HOME)/lib/$(ARCH) -L$(BZ2_HOME)/lib \
  -L$(LZMA_HOME)/lib/$(ARCH) -L$(LZMA_HOME)/.libs
LIBS = -ladvapi32 -lbz2 -llzma -lole32 -lshell32

MACHINE = $(shell $(CC) -dumpmachine)
WINDRES = $(MINGW_HOME)/bin/windres.exe
ifneq ("x$(MACHINE)","x")
ifeq ($(wildcard
$(MINGW_HOME)/bin/$(MACHINE)-windres.*),$(MINGW_HOME)/bin/$(MACHINE)-wi
ndres.exe)
    WINDRES = $(MINGW_HOME)/bin/$(MACHINE)-windres.exe
endif
endif

ifdef PACKAGECODE
    DEFINE_PACKAGECODE = define PACKAGECODE "$(strip $(PACKAGECODE))"
else
    DEFINE_PACKAGECODE = undef PACKAGECODE
endif
ifdef PACKAGESIZE
    DEFINE_PACKAGESIZE = define PACKAGESIZE $(strip $(PACKAGESIZE))
else
    DEFINE_PACKAGESIZE = undef PACKAGESIZE
endif

$(cygwin.target.dir)/$(TARGET_BASENAME).exe: bspatch.c
$(cygwin.target.dir)/config.h lasterror.c ../run/registry.c setup.c
$(cygwin.target.dir)/setup.res
  $(CC) $(CPPFLAGS) bspatch.c lasterror.c ../run/registry.c
setup.c $(target.dir)/setup.res $(LDFLAGS) -o
$(target.dir)/$(TARGET_BASENAME).exe $(LIBS)
  -$(MINGW_HOME)/$(MACHINE)/bin/strip.exe
$(target.dir)/$(TARGET_BASENAME).exe

.PHONY: $(cygwin.target.dir)/config.h

$(cygwin.target.dir)/config.h:
  echo #define PRODUCTNAME "$(PRODUCTNAME)" >
$(cygwin.target.dir)/config.h
  echo #$(DEFINE_PACKAGECODE) >> $(cygwin.target.dir)/config.h
  echo #$(DEFINE_PACKAGESIZE) >>
$(cygwin.target.dir)/config.hgwin.target.dir)/config.h

$(cygwin.target.dir)/setup.res: $(cygwin.target.dir)/config.h setup.rc
  $(WINDRES) -I../../../../resources/install/windows
-I$(target.dir) setup.rc -O coff -o $(target.dir)/setup.res

Thanks,
mafiosi


#4

Hmm.. that output is weird. I'm not sure if it's because of the line wrapping, but check that config.h is actually generated. Take a look at

     [exec] echo #undef PACKAGESIZE >>
C:\Users\\workspace\jitsi/release/windows/tmp/config.hgwin.tar
get.dir)/config.h

there's a path that is mangled with parts of the variable cygwin.target.dir.

Other than that, you might want to look at the makeXXXX-1.bat temporary makefile mentioned in the output before it is being deleted. Are you building on x86 or x64?

Ingo


#5

Hi Ingo,
I found out that was my mistake of typing, which I have corrected and
now returned my original error again;

     [exec]
CreateProcess(C:\Users\[Removed]\AppData\Local\Temp\make4892-1.bat,C:\U
sers\[Removed]\AppData\Local\Temp\make4892-1.bat,...)
     [exec] Putting child 0x92e648
(C:\Users\[Removed]\workspace\jitsi/release/windows/tmp/setup.exe) PID
9633488 on the chain.
     [exec] Live child 0x92e648
(C:\Users\[Removed]\workspace\jitsi/release/windows/tmp/setup.exe) PID
9633488
     [exec] setup.c:1770:1: warning: 'Setup_wstr2str' defined but not
used
     [exec]
c:/mingw/x86/bin/../lib/gcc/mingw32/4.5.2/../../../../mingw32/bin/ld.ex
e: cannot find -llzma
     [exec] collect2: ld returned 1 exit status
     [exec] Reaping losing child 0x92e648 PID 9633488
     [exec] Cleaning up temp batch file
C:\Users\[Removed]\AppData\Local\Temp\make4892-1.bat
     [exec] make.exe: ***
[C:\Users\[Removed]\workspace\jitsi/release/windows/tmp/setup.exe]
Error 1
     [exec] Removing child 0x92e648 PID 9633488 from chain.
     [exec] Result: 2

I have already installed xz and set the envirenmont variables;
in xz zip folder "bin_x86-64" is installed in;
C:\mingw\xz
Path;
LZMA_HOME=C:\mingw\xz

And I am building for x86, despite the facts build fails I can see in
"jitsi/release/windows/tmp/" folder that setup file is there and when I
can actually install and use the application.
Now the question is; should I just ignore the error and use the
setup.exe or should I really try to solve problem to wrap in msi.
Of course it will be perfect when everything works perfectly :slight_smile:
Thank a lot.
mafiosi


#6

I have already installed xz and set the envirenmont variables;
in xz zip folder "bin_x86-64" is installed in;
C:\mingw\xz
Path;
LZMA_HOME=C:\mingw\xz

And I am building for x86
[...]

If you build for x86, you need lzma in C:\mingw\xz\bin_i486.

It's entirely up to you whether you need the setup.exe. It simply compresses the msi and starts it after the extraction. The whole installation logic is in the msi.

Ingo


#7

c:/mingw/x86/bin/../lib/gcc/mingw32/4.5.2/../../../../mingw32/bin/ld.ex
e: cannot find -llzma

There's something wrong in the way you're trying to build setup.exe
because liblzma.a is in the Jitsi repository and the build procedure
does not require setting it up separately.

I have already installed xz and set the envirenmont variables;
in xz zip folder "bin_x86-64" is installed in;
C:\mingw\xz
Path;
LZMA_HOME=C:\mingw\xz

Again, xz.exe is in the Jitsi repository and the build procedure does
not require setting it up separately.

···

On Tue, Aug 30, 2011 at 12:04 PM, <nts.mafiosi@hotmail.co.uk> wrote:


#8

There's something wrong in the way you're trying to build setup.exe
because liblzma.a is in the Jitsi repository and the build procedure
does not require setting it up separately.

That's probably due to my patch in the earlier referenced message on the dev-list. Back then, I just searched a way to get a build done. It was by no means conclusive or "the way to go". Anyway, the build process is complicated and doesn't work from scratch. With our without my modifications.


#9

Hey guys,
thanks for responses,
I have removed the path and the library to make sure there is no
complication
and now everything works perfect.
Ps: restart of eclipse is required.
Regards and thanks a lot,
mafiosi