yaozhenx / mscgen

Automatically exported from code.google.com/p/mscgen
GNU General Public License v2.0
0 stars 0 forks source link

Failed to build native win32 executable #75

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

See the full build log at the end of the report. I am trying to build 
mscgen.exe on Window 7 64-bits with a recent cygwin. As you will see I am 
following the instructions of the README but quickly hit several problems. To 
summarize:

- There is no configure script, I suppose autoconf has to be run.
- Simply running autoconf fails.
- Having found a post saying running packaging/win32/win32.sh helps, I do that 
and it seems to improve things as it generates the configure script.
- Running ./configure fails probably because --mno-cygwin was dropped from GCC.

http://repo.or.cz/w/official-gcc.git/commit/2637551aa9314c46cf4205d435ab5e8944e9
ac8a

- Removing it allows ./configure to finish, unfortunately the following make 
fails because it still tries to link against gd. I gave up at this point.

What is the expected output? What do you see instead?

See below.

*As a sidenote, could you update the windows binaries available on:

  http://www.mcternan.me.uk/mscgen/

The reason I am building them is 0.21 apparently fixes things when used in 
asciidoc to generate PDF output.

Please provide any additional information below, including sample input
file:

[Sorry, I noticed the log had its locale set to French, I do not think this 
will be confusing, do not hesitate to ask if you need clarifications].

$ svn co  http://mscgen.googlecode.com/svn/trunk mscgen
A    mscgen/test
[...]
Révision 200 extraite.

$ cd mscgen

$ svn checkout http://mscgen.googlecode.com/svn/trunk/gdwin32 /tmp/gdwin32
Révision 200 extraite.

$ ./configure CFLAGS=-mno-cygwin \
>                 GDLIB_CFLAGS="-I/tmp/gdwin32/include" \
>                 GDLIB_LIBS="-L/tmp/gdwin32/lib -lbgd"
-bash: ./configure: No such file or directory

$ autoconf
configure.ac:14: error: possibly undefined macro: AM_INIT_AUTOMAKE
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
configure.ac:16: error: possibly undefined macro: AM_PROG_CC_C_O
configure.ac:18: error: possibly undefined macro: AM_PROG_LEX

$ (cd packaging/win32; ./
.svn/           bin/            examples/       packaging/
autogen.sh      configure       gdwin32/        src/
autom4te.cache/ configure.ac    man/            test/

$ (cd packaging/win32; ./win32.sh)
make: *** Aucune règle pour fabriquer la cible « distclean ». Arrêt.
autoreconf-2.68: Entering directory `.'
autoreconf-2.68: configure.ac: not using Gettext
autoreconf-2.68: running: aclocal --force
autoreconf-2.68: configure.ac: tracing
autoreconf-2.68: configure.ac: not using Libtool
autoreconf-2.68: running: /usr/bin/autoconf-2.68 --force
autoreconf-2.68: running: /usr/bin/autoheader-2.68 --force
autoreconf-2.68: running: automake --add-missing --copy --force-missing
configure.ac:16: installing `./compile'
configure.ac:14: installing `./install-sh'
configure.ac:14: installing `./missing'
src/Makefile.am: installing `./depcomp'
configure.ac: installing `./ylwrap'
autoreconf-2.68: Leaving directory `.'
checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in `/home/Patrick/dev/asciidoc/mscgen':
configure: error: C compiler cannot create executables
See `config.log' for more details
make: *** Aucune règle pour fabriquer la cible « distcheck ». Arrêt.
Distcheck failed!
ls: impossible d'accéder à ../../mscgen-*.tar.gz: No such file or directory
cp: opérande du fichier cible manquant après « mscgen-src-.tar.gz »
Saisissez « cp --help » pour plus d'informations.
tar (child): mscgen-src-.tar.gz : open impossible: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now
./win32.sh: line 34: ../../mscgen-/configure: No such file or directory
chmod: impossible d'accéder à « binstage/w32/mscgen-/bin/bgd.dll »: Not a 
directory
  adding: mscgen-/ (stored 0%)
  adding: mscgen-/bin (deflated 55%)
MakeNSIS v2.46 - Copyright 1995-2009 Contributors
See the file COPYING for license details.
Credits can be found in the Users Manual.

Processing config:
Processing plugin dlls: "C:\Program Files (x86)\NSIS\Plugins\*.dll"
 - AdvSplash::show
 - Banner::destroy
 - Banner::getWindow
 - Banner::show
 - BgImage::AddImage
 - BgImage::AddText
 - BgImage::Clear
 - BgImage::Destroy
 - BgImage::Redraw
 - BgImage::SetBg
 - BgImage::SetReturn
 - BgImage::Sound
 - Dialer::AttemptConnect
 - Dialer::AutodialHangup
 - Dialer::AutodialOnline
 - Dialer::AutodialUnattended
 - Dialer::GetConnectedState
 - InstallOptions::dialog
 - InstallOptions::initDialog
 - InstallOptions::show
 - LangDLL::LangDialog
 - Math::Script
 - NSISdl::download
 - NSISdl::download_quiet
 - Splash::show
 - StartMenu::Init
 - StartMenu::Select
 - StartMenu::Show
 - System::Alloc
 - System::Call
 - System::Copy
 - System::Free
 - System::Get
 - System::Int64Op
 - System::Store
 - TypeLib::GetLibVersion
 - TypeLib::Register
 - TypeLib::UnRegister
 - UserInfo::GetAccountType
 - UserInfo::GetName
 - UserInfo::GetOriginalAccountType
 - VPatch::GetFileCRC32
 - VPatch::GetFileMD5
 - VPatch::vpatchfile
 - nsDialogs::Create
 - nsDialogs::CreateControl
 - nsDialogs::CreateItem
 - nsDialogs::CreateTimer
 - nsDialogs::GetUserData
 - nsDialogs::KillTimer
 - nsDialogs::OnBack
 - nsDialogs::OnChange
 - nsDialogs::OnClick
 - nsDialogs::OnNotify
 - nsDialogs::SelectFileDialog
 - nsDialogs::SelectFolderDialog
 - nsDialogs::SetRTL
 - nsDialogs::SetUserData
 - nsDialogs::Show
 - nsExec::Exec
 - nsExec::ExecToLog
 - nsExec::ExecToStack

!define: "MUI_INSERT_NSISCONF"=""

Changing directory to: "F:\dev\asciidoc\mscgen\packaging\win32"

Processing script file: "installer-fixed.nsi"
!include: "EnvVarUpdate.nsh"
!define: "ENVVARUPDATE_FUNCTION"=""
----------------------------------------------------------------------
NSIS String Functions Header File 1.09 - Copyright 2004 Diego Pedroso
----------------------------------------------------------------------
 (C:\Program Files (x86)\NSIS\Include\StrFunc.nsh:52)
$ {StrTok} - Copyright 2004 Diego Pedroso - Based on functions by "bigmac666" 
(macro:STRFUNC_FUNC:11)
$ {UnStrTok} - Copyright 2004 Diego Pedroso - Based on functions by "bigmac666" 
(macro:STRFUNC_FUNC:5)
$ {StrStr} - Copyright 2004 Diego Pedroso - Based on functions by Ximon 
Eighteen (macro:STRFUNC_FUNC:11)
$ {UnStrStr} - Copyright 2004 Diego Pedroso - Based on functions by Ximon 
Eighteen (macro:STRFUNC_FUNC:5)
$ {StrRep} - Copyright 2004 Diego Pedroso - Based on functions by Hendri 
Adriaens (macro:STRFUNC_FUNC:11)
$ {UnStrRep} - Copyright 2004 Diego Pedroso - Based on functions by Hendri 
Adriaens (macro:STRFUNC_FUNC:5)
$ {StrStr} "$7" "$0" " ;" (macro:FUNCTION_STRING_StrStr_Call:3)
$ {StrRep} "$0" "$0" " ;" ";" (macro:FUNCTION_STRING_StrRep_Call:3)
$ {StrStr} "$7" "$0" "; " (macro:FUNCTION_STRING_StrStr_Call:3)
$ {StrRep} "$0" "$0" "; " ";" (macro:FUNCTION_STRING_StrRep_Call:3)
$ {StrStr} "$7" "$0" ";;" (macro:FUNCTION_STRING_StrStr_Call:3)
$ {StrRep} "$0" "$0" ";;" ";" (macro:FUNCTION_STRING_StrRep_Call:3)
$ {StrTok} "$7" "$9" ";" "$8" "0" (macro:FUNCTION_STRING_StrTok_Call:3)
$ {UnStrStr} "$7" "$0" " ;" (macro:FUNCTION_STRING_UnStrStr_Call:3)
$ {UnStrRep} "$0" "$0" " ;" ";" (macro:FUNCTION_STRING_UnStrRep_Call:3)
$ {UnStrStr} "$7" "$0" "; " (macro:FUNCTION_STRING_UnStrStr_Call:3)
$ {UnStrRep} "$0" "$0" "; " ";" (macro:FUNCTION_STRING_UnStrRep_Call:3)
$ {UnStrStr} "$7" "$0" ";;" (macro:FUNCTION_STRING_UnStrStr_Call:3)
$ {UnStrRep} "$0" "$0" ";;" ";" (macro:FUNCTION_STRING_UnStrRep_Call:3)
$ {UnStrTok} "$7" "$9" ";" "$8" "0" (macro:FUNCTION_STRING_UnStrTok_Call:3)
!include: closed: "EnvVarUpdate.nsh"
!include: "C:\Program Files (x86)\NSIS\Include\FileFunc.nsh"
!define: "FILEFUNC_INCLUDED"=""
!include: "C:\Program Files (x86)\NSIS\Include\Util.nsh"
!include: closed: "C:\Program Files (x86)\NSIS\Include\Util.nsh"
!define: "Locate"="!insertmacro LocateCall"
!define: "un.Locate"="!insertmacro LocateCall"
!define: "GetSize"="!insertmacro GetSizeCall"
!define: "un.GetSize"="!insertmacro GetSizeCall"
!define: "DriveSpace"="!insertmacro DriveSpaceCall"
!define: "un.DriveSpace"="!insertmacro DriveSpaceCall"
!define: "GetDrives"="!insertmacro GetDrivesCall"
!define: "un.GetDrives"="!insertmacro GetDrivesCall"
!define: "GetTime"="!insertmacro GetTimeCall"
!define: "un.GetTime"="!insertmacro GetTimeCall"
!define: "GetFileAttributes"="!insertmacro GetFileAttributesCall"
!define: "un.GetFileAttributes"="!insertmacro GetFileAttributesCall"
!define: "GetFileVersion"="!insertmacro GetFileVersionCall"
!define: "un.GetFileVersion"="!insertmacro GetFileVersionCall"
!define: "GetExeName"="!insertmacro GetExeNameCall"
!define: "un.GetExeName"="!insertmacro GetExeNameCall"
!define: "GetExePath"="!insertmacro GetExePathCall"
!define: "un.GetExePath"="!insertmacro GetExePathCall"
!define: "GetParameters"="!insertmacro GetParametersCall"
!define: "un.GetParameters"="!insertmacro GetParametersCall"
!define: "GetOptions"="!insertmacro GetOptionsCall"
!define: "un.GetOptions"="!insertmacro GetOptionsCall"
!define: "GetOptionsS"="!insertmacro GetOptionsSCall"
!define: "un.GetOptionsS"="!insertmacro GetOptionsSCall"
!define: "GetRoot"="!insertmacro GetRootCall"
!define: "un.GetRoot"="!insertmacro GetRootCall"
!define: "GetParent"="!insertmacro GetParentCall"
!define: "un.GetParent"="!insertmacro GetParentCall"
!define: "GetFileName"="!insertmacro GetFileNameCall"
!define: "un.GetFileName"="!insertmacro GetFileNameCall"
!define: "GetBaseName"="!insertmacro GetBaseNameCall"
!define: "un.GetBaseName"="!insertmacro GetBaseNameCall"
!define: "GetFileExt"="!insertmacro GetFileExtCall"
!define: "un.GetFileExt"="!insertmacro GetFileExtCall"
!define: "BannerTrimPath"="!insertmacro BannerTrimPathCall"
!define: "un.BannerTrimPath"="!insertmacro BannerTrimPathCall"
!define: "DirState"="!insertmacro DirStateCall"
!define: "un.DirState"="!insertmacro DirStateCall"
!define: "RefreshShellIcons"="!insertmacro RefreshShellIconsCall"
!define: "un.RefreshShellIcons"="!insertmacro RefreshShellIconsCall"
!include: closed: "C:\Program Files (x86)\NSIS\Include\FileFunc.nsh"
Name: "Mscgen"
!define: "VERSION"=""
!define: "FILES"="binstage\w32\mscgen-"
OutFile: "mscgen_.exe"
InstallDir: "$PROGRAMFILES\Mscgen"
InstallRegKey: "HKLM\Software\Mscgen\Install_Dir"
ShowInstDetails: show
SetCompressor: /FINAL /SOLID lzma
Page: license
Page: directory
Page: instfiles
UninstPage: uninstConfirm
UninstPage: instfiles
LicenseText: "Mscgen is licensed under the GPLv2.  Please review this licence 
displayed below or check the COPYING file after installation." "Next >"
LicenseData: open failed "binstage\w32\mscgen-\share\doc\mscgen\COPYING"
Usage: LicenseData local_file_that_has_license_text | license_lang_string
Error in script "installer-fixed.nsi" on line 53 -- aborting creation process

$ ./configure CFLAGS=-mno-cygwin                 
GDLIB_CFLAGS="-I/tmp/gdwin32/include"                 
GDLIB_LIBS="-L/tmp/gdwin32/lib -lbgd"
checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in `/home/Patrick/dev/asciidoc/mscgen':
configure: error: C compiler cannot create executables
See `config.log' for more details

$ ./configure GDLIB_CFLAGS="-I/tmp/gdwin32/include"                 
GDLIB_LIBS="-L/tmp/gdwin32/lib -lbgd"
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.exe
checking for suffix of executables... .exe
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking whether gcc and cc understand -c and -o together... yes
checking for a sed that does not truncate output... /usr/bin/sed
checking for flex... flex
checking lex output file root... lex.yy
checking lex library... -lfl
checking whether yytext is a pointer... yes
checking for bison... bison -y
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for unistd.h... (cached) yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking for gdlib-config... no
checking for GDLIB... yes
checking gd.h usability... yes
checking gd.h presence... yes
checking for gd.h... yes
checking if gdImageColorAllocate() can be linked... no
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating man/Makefile
config.status: creating test/Makefile
config.status: creating examples/Makefile
config.status: creating config.h
config.status: executing depfiles commands

$ make
make  all-recursive
make[1] : on entre dans le répertoire « /cygdrive/f/dev/asciidoc/mscgen »
Making all in src
make[2] : on entre dans le répertoire « /cygdrive/f/dev/asciidoc/mscgen/src »
/bin/sh ../ylwrap language.y y.tab.c language.c y.tab.h language.h y.output 
language.output -- bison -y -d
updating language.h
/bin/sh ../ylwrap lexer.l lex.yy.c lexer.c -- flex
make  all-am
make[3] : on entre dans le répertoire « /cygdrive/f/dev/asciidoc/mscgen/src »
gcc -DHAVE_CONFIG_H -I. -I..   -I/tmp/gdwin32/include  -g -O2 -MT 
mscgen-adraw.o -MD -MP -MF .deps/mscgen-adraw.Tpo -c -o mscgen-adraw.o `test -f 
'adraw.c' || echo './'`adraw.c
mv -f .deps/mscgen-adraw.Tpo .deps/mscgen-adraw.Po
gcc -DHAVE_CONFIG_H -I. -I..   -I/tmp/gdwin32/include  -g -O2 -MT 
mscgen-cmdparse.o -MD -MP -MF .deps/mscgen-cmdparse.Tpo -c -o mscgen-cmdparse.o 
`test -f 'cmdparse.c' || echo './'`cmdparse.c
mv -f .deps/mscgen-cmdparse.Tpo .deps/mscgen-cmdparse.Po
gcc -DHAVE_CONFIG_H -I. -I..   -I/tmp/gdwin32/include  -g -O2 -MT mscgen-main.o 
-MD -MP -MF .deps/mscgen-main.Tpo -c -o mscgen-main.o `test -f 'main.c' || echo 
'./'`main.c
mv -f .deps/mscgen-main.Tpo .deps/mscgen-main.Po
gcc -DHAVE_CONFIG_H -I. -I..   -I/tmp/gdwin32/include  -g -O2 -MT 
mscgen-svg_out.o -MD -MP -MF .deps/mscgen-svg_out.Tpo -c -o mscgen-svg_out.o 
`test -f 'svg_out.c' || echo './'`svg_out.c
mv -f .deps/mscgen-svg_out.Tpo .deps/mscgen-svg_out.Po
gcc -DHAVE_CONFIG_H -I. -I..   -I/tmp/gdwin32/include  -g -O2 -MT 
mscgen-language.o -MD -MP -MF .deps/mscgen-language.Tpo -c -o mscgen-language.o 
`test -f 'language.c' || echo './'`language.c
mv -f .deps/mscgen-language.Tpo .deps/mscgen-language.Po
gcc -DHAVE_CONFIG_H -I. -I..   -I/tmp/gdwin32/include  -g -O2 -MT mscgen-msc.o 
-MD -MP -MF .deps/mscgen-msc.Tpo -c -o mscgen-msc.o `test -f 'msc.c' || echo 
'./'`msc.c
mv -f .deps/mscgen-msc.Tpo .deps/mscgen-msc.Po
gcc -DHAVE_CONFIG_H -I. -I..   -I/tmp/gdwin32/include  -g -O2 -MT 
mscgen-ps_out.o -MD -MP -MF .deps/mscgen-ps_out.Tpo -c -o mscgen-ps_out.o `test 
-f 'ps_out.c' || echo './'`ps_out.c
mv -f .deps/mscgen-ps_out.Tpo .deps/mscgen-ps_out.Po
gcc -DHAVE_CONFIG_H -I. -I..   -I/tmp/gdwin32/include  -g -O2 -MT mscgen-utf8.o 
-MD -MP -MF .deps/mscgen-utf8.Tpo -c -o mscgen-utf8.o `test -f 'utf8.c' || echo 
'./'`utf8.c
mv -f .deps/mscgen-utf8.Tpo .deps/mscgen-utf8.Po
gcc -DHAVE_CONFIG_H -I. -I..   -I/tmp/gdwin32/include  -g -O2 -MT 
mscgen-gd_out.o -MD -MP -MF .deps/mscgen-gd_out.Tpo -c -o mscgen-gd_out.o `test 
-f 'gd_out.c' || echo './'`gd_out.c
mv -f .deps/mscgen-gd_out.Tpo .deps/mscgen-gd_out.Po
gcc -DHAVE_CONFIG_H -I. -I..   -I/tmp/gdwin32/include  -g -O2 -MT mscgen-safe.o 
-MD -MP -MF .deps/mscgen-safe.Tpo -c -o mscgen-safe.o `test -f 'safe.c' || echo 
'./'`safe.c
mv -f .deps/mscgen-safe.Tpo .deps/mscgen-safe.Po
gcc -DHAVE_CONFIG_H -I. -I..   -I/tmp/gdwin32/include  -g -O2 -MT 
mscgen-lexer.o -MD -MP -MF .deps/mscgen-lexer.Tpo -c -o mscgen-lexer.o `test -f 
'lexer.c' || echo './'`lexer.c
mv -f .deps/mscgen-lexer.Tpo .deps/mscgen-lexer.Po
gcc -DHAVE_CONFIG_H -I. -I..   -I/tmp/gdwin32/include  -g -O2 -MT 
mscgen-null_out.o -MD -MP -MF .deps/mscgen-null_out.Tpo -c -o mscgen-null_out.o 
`test -f 'null_out.c' || echo './'`null_out.c
mv -f .deps/mscgen-null_out.Tpo .deps/mscgen-null_out.Po
gcc -DHAVE_CONFIG_H -I. -I..   -I/tmp/gdwin32/include  -g -O2 -MT 
mscgen-usage.o -MD -MP -MF .deps/mscgen-usage.Tpo -c -o mscgen-usage.o `test -f 
'usage.c' || echo './'`usage.c
mv -f .deps/mscgen-usage.Tpo .deps/mscgen-usage.Po
gcc  -g -O2    -o mscgen.exe mscgen-adraw.o mscgen-cmdparse.o  mscgen-main.o 
mscgen-svg_out.o  mscgen-language.o mscgen-msc.o  mscgen-ps_out.o mscgen-utf8.o 
 mscgen-gd_out.o mscgen-safe.o  mscgen-lexer.o mscgen-null_out.o  
mscgen-usage.o -lm -L/tmp/gdwin32/lib -lbgd -lgd -lm
/usr/lib/gcc/i686-pc-cygwin/4.5.3/../../../../i686-pc-cygwin/bin/ld: cannot 
find -lgd
collect2: ld a retourné 1 code d'état d'exécution
Makefile:267: recipe for target `mscgen.exe' failed
make[3]: *** [mscgen.exe] Error 1
make[3] : on quitte le répertoire « /cygdrive/f/dev/asciidoc/mscgen/src »
Makefile:192: recipe for target `all' failed
make[2]: *** [all] Error 2
make[2] : on quitte le répertoire « /cygdrive/f/dev/asciidoc/mscgen/src »
Makefile:320: recipe for target `all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1] : on quitte le répertoire « /cygdrive/f/dev/asciidoc/mscgen »
Makefile:242: recipe for target `all' failed
make: *** [all] Error 2

Original issue reported on code.google.com by patr...@mezard.eu on 28 Aug 2012 at 11:22