project-navigation
Personal tools

Author Topic: (log) Actually got new build system to (partially) work on Windows 7  (Read 35500 times)

Offline Mattn

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4831
  • https://github.com/mgerhardy/vengi
    • View Profile
    • Vengi Voxel Tools
Re: (log) Actually got new build system to (partially) work on Windows 7
« Reply #15 on: October 08, 2010, 07:54:03 am »
i've added testall and game targets to the project file.

Offline Muton

  • Sergeant
  • *****
  • Posts: 496
    • View Profile
Re: (log) Actually got new build system to (partially) work on Windows 7
« Reply #16 on: October 09, 2010, 12:55:08 pm »
After some time
a success report

I'm able to build everything in MinGW (shared)
only a small bug troubled uforadiant linking

mingw32.mk
OPENGL_LIBS              ?= -lopengl32
OPENAL_LIBS              ?= -lopenal32
PKG_CONFIG               ?= $(CROSS)pkg-config

I'm not using the outdated codeblocks.zip (MinGW environment)
but my own one
attached somewhere on page one

« Last Edit: October 09, 2010, 02:40:47 pm by Muton »

Offline Mattn

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4831
  • https://github.com/mgerhardy/vengi
    • View Profile
    • Vengi Voxel Tools
Re: (log) Actually got new build system to (partially) work on Windows 7
« Reply #17 on: October 09, 2010, 03:37:08 pm »
thanks - fixed in latest master

Offline Muton

  • Sergeant
  • *****
  • Posts: 496
    • View Profile
Re: (log) Actually got new build system to (partially) work on Windows 7
« Reply #18 on: October 09, 2010, 08:21:31 pm »
A question related to pkg-config

example SDL_Image
if i build that lib as static and shared
i should have 2 entries right?
Libs: .....
Libs.private: ......

Libs.private
is for static
and Libs
for shared

but i dont have a
Libs.private entry in *.pc ???

but SDL_image depend on jpeg png and tiff
shouldnt all that be part of Libs.private?


The "strange" thing is the .la files does have every depending lib listed
Why do i have a .la file and a .pc file ???
« Last Edit: October 09, 2010, 08:24:56 pm by Muton »

Offline Mattn

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4831
  • https://github.com/mgerhardy/vengi
    • View Profile
    • Vengi Voxel Tools
Re: (log) Actually got new build system to (partially) work on Windows 7
« Reply #19 on: October 10, 2010, 07:55:23 am »
the la file is a libtool file that is used when you use libtool for linking (which we don't do [yet - because i don't have a lot of experience with it])

Offline Muton

  • Sergeant
  • *****
  • Posts: 496
    • View Profile
Re: (log) Actually got new build system to (partially) work on Windows 7
« Reply #20 on: October 10, 2010, 03:18:04 pm »
I have a small problem with radiant and libstdc++ libgcc_s_dw2
The exe and dll always request this dlls
even if i add -static-libgcc

While using C::B and -static-libgcc result in static linked lib
what do i miss ?

and where do i add -Wall to see ld output ?

thx

Offline Mattn

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4831
  • https://github.com/mgerhardy/vengi
    • View Profile
    • Vengi Voxel Tools
Re: (log) Actually got new build system to (partially) work on Windows 7
« Reply #21 on: October 10, 2010, 05:04:35 pm »
type "make Q=" to show all commands that are used to compile and/or link

dwarf2 is the exception handling that the tdm gcc mingw build uses by default afair. make sure to use this for every lib you are using. you may not mix them.

Offline Muton

  • Sergeant
  • *****
  • Posts: 496
    • View Profile
Re: (log) Actually got new build system to (partially) work on Windows 7
« Reply #22 on: October 10, 2010, 06:44:40 pm »
radiant.exe and brushexport.dll are requesting those dlls
none of the gtk or glib libs

Offline Mattn

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4831
  • https://github.com/mgerhardy/vengi
    • View Profile
    • Vengi Voxel Tools
Re: (log) Actually got new build system to (partially) work on Windows 7
« Reply #23 on: October 10, 2010, 08:35:16 pm »
please check that g++ is used for linking radiant

Offline Muton

  • Sergeant
  • *****
  • Posts: 496
    • View Profile
Re: (log) Actually got new build system to (partially) work on Windows 7
« Reply #24 on: October 10, 2010, 10:00:45 pm »
no cc does linking
Code: [Select]
src/tools/radiant/libs/generic/static.h:97:14: warning: inlining failed in call to 'static void
CountedStatic<Type, Context>::release() [with Type = TypeSystemInitialiser, Context = Null]': call
is unlikely and code size would grow
src/tools/radiant/libs/generic/static.h:124:3: warning: called from here
In file included from D:/temp/TMP_CO~2/UFOAIW~1/MinGW/include/gtk-2.0/gdk/gdkscreen.h:31:0,
                 from D:/temp/TMP_CO~2/UFOAIW~1/MinGW/include/gtk-2.0/gdk/gdkapplaunchcontext.h:31,
                 from D:/temp/TMP_CO~2/UFOAIW~1/MinGW/include/gtk-2.0/gdk/gdk.h:32,
                 from D:/temp/TMP_CO~2/UFOAIW~1/MinGW/include/gtk-2.0/gtk/gtk.h:32,
                 from src/tools/radiant/plugins/brushexport/support.h:1,
                 from src/tools/radiant/plugins/brushexport/support.cpp:1:
D:/temp/TMP_CO~2/UFOAIW~1/MinGW/include/cairo/cairo.h:1976:26: warning: comma at end of enumerator list
===> LD [radiant/plugins/brushexport.dll]
cc -DHAVE_CONFIG_H -ggdb -Winline -Wcast-qual -Wcast-align -Wmissing-declarations -Wpointer-arit
h -Wno-long-long -pedantic -Wextra -Wno-sign-compare -Wno-unused-parameter -Wreturn-type
-Wwrite-strings -DSHARED_EXT=\"dll\" -DGETTEXT_STATIC -DWINVER=0x501 -O2 -ffast-math -funroll-loops
-D_FORTIFY_SOURCE=2 -DNDEBUG -falign-loops=2 -falign-jumps=2 -falign-functions=2
-fno-strict-aliasing   
release-mingw32-i386/uforadiant-brushexport/tools/radiant/plugins/brushexport/callbacks.cpp.o
release-mingw32-i386/uforadiant-brushexport/tools/radiant/plugins/brushexport/export.cpp.o
release-mingw32-i386/uforadiant-brushexport/tools/radiant/plugins/brushexport/interface.cpp.o
release-mingw32-i386/uforadiant-brushexport/tools/radiant/plugins/brushexport/plugin.cpp.o
release-mingw32-i386/uforadiant-brushexport/tools/radiant/plugins/brushexport/support.cpp.o   
-static-libgcc -static-libstdc++ -shared `pkg-config --libs gtk+-2.0 2> /dev/null || ( if [ -z ""
]; then echo "-lgtk+-2.0"; else echo "-l"; fi )` `pkg-config --libs glib-2.0 2> /dev/null || ( if [
-z "" ]; then echo "-lglib-2.0"; else echo "-l"; fi )` -lstdc++ -lm -o
radiant/plugins/brushexport.dll
Info: resolving std::basic_string<char, std::char_traits<char>, std::allocator<char>
>::_Rep::_S_empty_rep_storage by linking to __imp___ZNSs4_Rep20_S_empty_rep_storageE (auto-import)
Info: resolving vtable for __cxxabiv1::__si_class_type_info by linking to
__imp___ZTVN10__cxxabiv120__si_class_type_infoE (auto-import)
Info: resolving vtable for __cxxabiv1::__class_type_info by linking to
__imp___ZTVN10__cxxabiv117__class_type_infoE (auto-import)
Info: resolving vtable for __cxxabiv1::__vmi_class_type_info by linking to
__imp___ZTVN10__cxxabiv121__vmi_class_type_infoE
(auto-importd:/temp/tmp_co~2/ufoaiw~1/mingw/bin/../lib/gcc/mingw32/4.5.0/../../../../mingw32/bin/ld
.exe: warning: auto-importing has been activated without --enable-auto-import specified on the
command line.
This should work unless it involves constant data structures referencing symbols from auto-imported DLLs.)

cc.exe: unrecognized option '-static-libstdc++'

btw
export CC=gcc
does not work
/bin/sh: cc: command not found

Offline Mattn

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4831
  • https://github.com/mgerhardy/vengi
    • View Profile
    • Vengi Voxel Tools
Re: (log) Actually got new build system to (partially) work on Windows 7
« Reply #25 on: October 11, 2010, 10:35:12 am »
call make CC=gcc

i suppose you have config.mk already set up with CC set.

if you don't do make clean-uforadiant before, just call "make CC=g++ CXX=g++ uforadiant" please

Offline Muton

  • Sergeant
  • *****
  • Posts: 496
    • View Profile
Re: (log) Actually got new build system to (partially) work on Windows 7
« Reply #26 on: October 11, 2010, 08:27:53 pm »
> export CC=gcc
> does not work
My fault, stupid winuser  ::)
cc=gcc != CC=gcc
added into /etc/profile


> i suppose you have config.mk already set up with CC set.
No, my mod is attached



make distclean ; ./configure --prefix= --enable-release --target-os=mingw32 && make Q= -j4 CC=g++ CXX=g++ uforadiant-brushexport && echo ok
google
using
http://downloads.sourceforge.net/mingw/gcc-c++-4.5.0-1-mingw32-bin.tar.lzma
http://downloads.sourceforge.net/mingw/gcc-core-4.5.0-1-mingw32-bin.tar.lzma
http://downloads.sourceforge.net/mingw/libgcc-4.5.0-1-mingw32-dll-1.tar.lzma
http://downloads.sourceforge.net/mingw/libssp-4.5.0-1-mingw32-dll-0.tar.lzma
http://downloads.sourceforge.net/mingw/libstdc++-4.5.0-1-mingw32-dll-6.tar.lzma
tried tdm -> same result
Code: [Select]
===> LD [radiant/plugins/brushexport.dll]
g++ -DHAVE_CONFIG_H -ggdb -Winline -Wcast-qual -Wcast-align -Wmissing-declarations -Wpointer-arith -Wno-long-long -pedantic -Wextra
-Wno-sign-compare -Wno-unused-parameter -Wreturn-type -Wwrite-strings -DSHARED_EXT=\"dll\" -DGETTEXT_STATIC -DWINVER=0x501 -O2
-ffast-math -funroll-loops -D_FORTIFY_SOURCE=2 -DNDEBUG -falign-loops=2 -falign-jumps=2 -falign-functions=2 -fno-strict-aliasing   
release-mingw32-i386/uforadiant-brushexport/tools/radiant/plugins/brushexport/callbacks.cpp.o
release-mingw32-i386/uforadiant-brushexport/tools/radiant/plugins/brushexport/export.cpp.o
release-mingw32-i386/uforadiant-brushexport/tools/radiant/plugins/brushexport/interface.cpp.o
release-mingw32-i386/uforadiant-brushexport/tools/radiant/plugins/brushexport/plugin.cpp.o
release-mingw32-i386/uforadiant-brushexport/tools/radiant/plugins/brushexport/support.cpp.o   
-static-libgcc -static-libstdc++ -shared `pkg-config --libs gtk+-2.0 2> /dev/null || ( if [ -z "" ]; then echo "-lgtk+-2.0"; else echo
"-l"; fi )` `pkg-config --libs glib-2.0 2> /dev/null || ( if [ -z "" ]; then echo "-lglib-2.0"; else echo "-l"; fi )` -lstdc++ -lm -o radiant/plugins/brushexport.dll
d:/temp/tmp_co~2/ufoaiw~1/mingw/bin/../lib/gcc/mingw32/4.5.0\libstdc++.a(string-inst.o):(.text$_ZNSsC1ERKSs[std::basic_
string<char, std::char_traits<char>, std::allocator<char> >::basic_string(std::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&)]+0x0): multiple definition of `std::basic_string<char,
std::char_traits<char>, std::allocator<char> >::basic_string(std::string const&)'
d:/temp/tmp_co~2/ufoaiw~1/mingw/bin/../lib/gcc/mingw32/4.5.0/libstdc++.dll.a(d001060.o):(.text+0x0): first defined here
d:/temp/tmp_co~2/ufoaiw~1/mingw/bin/../lib/gcc/mingw32/4.5.0\libstdc++.a(string-inst.o):(.text$_ZNSsC1ERKSsjj[std::basi
c_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(std::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&, unsigned int, unsigned int)]+0x0): multiple definition of
`std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(std::string const&, unsigned int,
unsigned int)'
d:/temp/tmp_co~2/ufoaiw~1/mingw/bin/../lib/gcc/mingw32/4.5.0/libstdc++.dll.a(d001061.o):(.text+0x0): first defined here
d:/temp/tmp_co~2/ufoaiw~1/mingw/bin/../lib/gcc/mingw32/4.5.0\libstdc++.a(string-inst.o):(.text$_ZNSsD1Ev[std::basic_str
ing<char, std::char_traits<char>, std::allocator<char> >::~basic_string()]+0x0): multiple definition of
`std::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()'
d:/temp/tmp_co~2/ufoaiw~1/mingw/bin/../lib/gcc/mingw32/4.5.0/libstdc++.dll.a(d001081.o):(.text+0x0): first defined here
d:/temp/tmp_co~2/ufoaiw~1/mingw/bin/../lib/gcc/mingw32/4.5.0\libstdc++.a(string-inst.o):(.text$_ZNSs6appendEPKcj[std::b
asic_string<char, std::char_traits<char>, std::allocator<char> >::append(char const*, unsigned int)]+0x0): multiple
definition of `std::string::append(char const*, unsigned int)'
d:/temp/tmp_co~2/ufoaiw~1/mingw/bin/../lib/gcc/mingw32/4.5.0/libstdc++.dll.a(d001011.o):(.text+0x0): first defined here
d:/temp/tmp_co~2/ufoaiw~1/mingw/bin/../lib/gcc/mingw32/4.5.0\libstdc++.a(string-inst.o):(.text$_ZNSs6assignEPKcj[std::b
asic_string<char, std::char_traits<char>, std::allocator<char> >::assign(char const*, unsigned int)]+0x0): multiple
definition of `std::string::assign(char const*, unsigned int)'
d:/temp/tmp_co~2/ufoaiw~1/mingw/bin/../lib/gcc/mingw32/4.5.0/libstdc++.dll.a(d001018.o):(.text+0x0): first defined here
d:/temp/tmp_co~2/ufoaiw~1/mingw/bin/../lib/gcc/mingw32/4.5.0\libstdc++.a(string-inst.o):(.text$_ZNKSs5rfindEPKcjj[std::
basic_string<char, std::char_traits<char>, std::allocator<char> >::rfind(char const*, unsigned int, unsigned int)
const]+0x0): multiple definition of `std::string::rfind(char const*, unsigned int, unsigned int) const'
d:/temp/tmp_co~2/ufoaiw~1/mingw/bin/../lib/gcc/mingw32/4.5.0/libstdc++.dll.a(d000240.o):(.text+0x0): first defined here
d:/temp/tmp_co~2/ufoaiw~1/mingw/bin/../lib/gcc/mingw32/4.5.0\libstdc++.a(string-inst.o):(.text$_ZNKSs12find_last_ofEPKc
jj[std::basic_string<char, std::char_traits<char>, std::allocator<char> >::find_last_of(char const*, unsigned int,
unsigned int) const]+0x0): multiple definition of `std::string::find_last_of(char const*, unsigned int, unsigned int)
const'
d:/temp/tmp_co~2/ufoaiw~1/mingw/bin/../lib/gcc/mingw32/4.5.0/libstdc++.dll.a(d000205.o):(.text+0x0): first defined here
d:/temp/tmp_co~2/ufoaiw~1/mingw/bin/../lib/gcc/mingw32/4.5.0\libstdc++.a(string-inst.o):(.text$_ZNSs4_Rep10_M_destroyER
KSaIcE[std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_Rep::_M_destroy(std::allocator<char>
const&)]+0x0): multiple definition of `std::string::_Rep::_M_destroy(std::allocator<char> const&)'
d:/temp/tmp_co~2/ufoaiw~1/mingw/bin/../lib/gcc/mingw32/4.5.0/libstdc++.dll.a(d000988.o):(.text+0x0): first defined here
d:/temp/tmp_co~2/ufoaiw~1/mingw/bin/../lib/gcc/mingw32/4.5.0\libstdc++.a(string-inst.o):(.text$_ZNSs6assignERKSs[std::b
asic_string<char, std::char_traits<char>, std::allocator<char> >::assign(std::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&)]+0x0): multiple definition of `std::string::assign(std::string
const&)'
d:/temp/tmp_co~2/ufoaiw~1/mingw/bin/../lib/gcc/mingw32/4.5.0/libstdc++.dll.a(d001019.o):(.text+0x0): first defined here
d:/temp/tmp_co~2/ufoaiw~1/mingw/bin/../lib/gcc/mingw32/4.5.0\libstdc++.a(string-inst.o):(.text$_ZNSsC1EPKcRKSaIcE[std::
basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(char const*, std::allocator<char>
const&)]+0x0): multiple definition of `std::basic_string<char, std::char_traits<char>, std::allocator<char>
>::basic_string(char const*, std::allocator<char> const&)'
d:/temp/tmp_co~2/ufoaiw~1/mingw/bin/../lib/gcc/mingw32/4.5.0/libstdc++.dll.a(d001057.o):(.text+0x0): first defined here
d:/temp/tmp_co~2/ufoaiw~1/mingw/bin/../lib/gcc/mingw32/4.5.0\libstdc++.a(atomicity.o):(.text$_ZN9__gnu_cxx18__exchange_
and_addEPVii+0x0): multiple definition of `__gnu_cxx::__exchange_and_add(int volatile*, int)'
d:/temp/tmp_co~2/ufoaiw~1/mingw/bin/../lib/gcc/mingw32/4.5.0/libstdc++.dll.a(d000071.o):(.text+0x0): first defined here
d:/temp/tmp_co~2/ufoaiw~1/mingw/bin/../lib/gcc/mingw32/4.5.0\libstdc++.a(functexcept.o):(.text$_ZSt20__throw_length_err
orPKc+0x0): multiple definition of `std::__throw_length_error(char const*)'
d:/temp/tmp_co~2/ufoaiw~1/mingw/bin/../lib/gcc/mingw32/4.5.0/libstdc++.dll.a(d002667.o):(.text+0x0): first defined here
d:/temp/tmp_co~2/ufoaiw~1/mingw/bin/../lib/gcc/mingw32/4.5.0\libstdc++.a(functexcept.o):(.text$_ZSt20__throw_out_of_ran
gePKc+0x0): multiple definition of `std::__throw_out_of_range(char const*)'
d:/temp/tmp_co~2/ufoaiw~1/mingw/bin/../lib/gcc/mingw32/4.5.0/libstdc++.dll.a(d002668.o):(.text+0x0): first defined here
d:/temp/tmp_co~2/ufoaiw~1/mingw/bin/../lib/gcc/mingw32/4.5.0\libstdc++.a(eh_throw.o):(.text$__cxa_rethrow+0x0):
multiple definition of `__cxa_rethrow'
d:/temp/tmp_co~2/ufoaiw~1/mingw/bin/../lib/gcc/mingw32/4.5.0/libstdc++.dll.a(d003390.o):(.text+0x0): first defined here
d:/temp/tmp_co~2/ufoaiw~1/mingw/bin/../lib/gcc/mingw32/4.5.0\libstdc++.a(eh_personality.o):(.text$__gxx_personality_v0+
0x0): multiple definition of `__gxx_personality_v0'
d:/temp/tmp_co~2/ufoaiw~1/mingw/bin/../lib/gcc/mingw32/4.5.0/libstdc++.dll.a(d003403.o):(.text+0x0): first defined here
collect2: ld returned 1 exit status
make: *** [radiant/plugins/brushexport.dll] Error 1
« Last Edit: October 11, 2010, 08:31:08 pm by Muton »

Offline Mattn

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4831
  • https://github.com/mgerhardy/vengi
    • View Profile
    • Vengi Voxel Tools
Re: (log) Actually got new build system to (partially) work on Windows 7
« Reply #27 on: October 11, 2010, 10:02:43 pm »
yes - now you have to remove the -lstdc++ from the build/modules/*.mk LDFLAGS

Offline Muton

  • Sergeant
  • *****
  • Posts: 496
    • View Profile
Re: (log) Actually got new build system to (partially) work on Windows 7
« Reply #28 on: October 12, 2010, 09:12:30 pm »
yes thats it

now i stuck on W2k compatibility (ufo.exe)
I found something but the linker dont include wspiapi.h
Never had a problem with C::B ....
Code: [Select]
release-mingw32-i386/ufo/common/net.c.o:net.c:(.data+0x4): undefined reference to `WspiapiLegacyGetAddrInfo@16'
release-mingw32-i386/ufo/common/net.c.o:net.c:(.data+0xc): undefined reference to `WspiapiLegacyGetNameInfo@28'
release-mingw32-i386/ufo/common/net.c.o:net.c:(.data+0x14): undefined reference to `WspiapiLegacyFreeAddrInfo@4'
release-mingw32-i386/ufo/common/net.c.o:net.c:(.rdata+0x834): undefined reference to `WspiapiLegacyGetAddrInfo@16'
release-mingw32-i386/ufo/common/net.c.o:net.c:(.rdata+0x83c): undefined reference to `WspiapiLegacyGetNameInfo@28'
release-mingw32-i386/ufo/common/net.c.o:net.c:(.rdata+0x844): undefined reference to `WspiapiLegacyFreeAddrInfo@4'

Offline Mattn

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4831
  • https://github.com/mgerhardy/vengi
    • View Profile
    • Vengi Voxel Tools
Re: (log) Actually got new build system to (partially) work on Windows 7
« Reply #29 on: October 12, 2010, 09:37:54 pm »
please retry with latest master revision - i've added a per-target-linker-option. so uforadiant related targets are now linked with g++

are there any other changes you've made in order to get that far?

about w2k, i'll do some research, too (but i can't test here, no w2k)