OCaml cross compiler
by Luigi Santocanale
Hello,
I got interested to the ocamlcross compiler.
After installing
mingw32-ocaml
I try to compile, with the result
lsantoca@delle6500:~$ i686-pc-mingw32-ocamlopt test.ml
Fatal error: unknown C primitive `caml_set_parser_trace'
Should I install something else ?
Best,
Luigi
--
Luigi Santocanale
LIF/CMI Marseille Tél: 04 91 11 35 74
http://www.cmi.univ-mrs.fr/~lsantoca/ Fax: 04 91 11 36 02
15 years, 2 months
submiting mingw32-libssh2 for review
by itamar
Hello Richard.
do you have plans to submit mingw32-libssh2 and other packages for review ?
--
------------
Itamar Reis Peixoto
e-mail/msn: itamar(a)ispbrasil.com.br
sip: itamar(a)ispbrasil.com.br
skype: itamarjp
icq: 81053601
+55 11 4063 5033
+55 34 3221 8599
15 years, 2 months
nsis
by Farkas Levente
hi,
my first patch for nsis:
- patch for the spec file
- two new updated patches
- you can remove:
nsis-2.19-debian-64bit-fixes.patch
nsis-2.19-debian-debug-opt.patch
nsis-2.19-mingw-search.patch
nsis-2.39-debian-64bit-fixes.patch
nsis-2.39-debian-debug-opt.patch
i didn't rename nsis-2.39-mingw32-search.patch since it's apply clean,
but you can update if you like it.
the only problem this this part of the orig spec is not true:
----------------------------------------
# We really need the 32 bit version of this library. The 64 bit
# version will definitely not work. XXX Need to do the right thing on
# non-x86 architectures.
BuildRequires: /usr/lib/libwx_baseu-2.8.so
----------------------------------------
since in 64 bit it's also /usr/lib/libwx_baseu-2.8.so. i'll look into it
when i have some free time (or anyone has any tip)?
--
Levente "Si vis pacem para bellum!"
diff -r 9f58deb1a4f9 nsis/mingw32-nsis.spec
--- a/nsis/mingw32-nsis.spec Mon Feb 02 19:08:07 2009 +0000
+++ b/nsis/mingw32-nsis.spec Mon Feb 02 23:24:08 2009 +0100
@@ -2,8 +2,8 @@
%define _default_patch_fuzz 2
Name: mingw32-nsis
-Version: 2.39
-Release: 5%{?dist}
+Version: 2.42
+Release: 1%{?dist}
Summary: Nullsoft Scriptable Install System
License: zlib and CPL
@@ -13,18 +13,18 @@
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
# Patches from Debian (mainly by Paul Wise).
-Patch0: nsis-2.39-debian-64bit-fixes.patch
-Patch1: nsis-2.39-debian-debug-opt.patch
+Patch0: nsis-2.42-debian-64bit-fixes.patch
+Patch1: nsis-2.42-debian-debug-opt.patch
# This patch is required for NSIS to find the correct cross-compiler.
Patch100: nsis-2.39-mingw32-search.patch
-BuildRequires: mingw32-filesystem >= 20
+BuildRequires: mingw32-filesystem >= 40
BuildRequires: mingw32-gcc
BuildRequires: mingw32-gcc-c++
BuildRequires: mingw32-binutils
BuildRequires: python
-BuildRequires: scons >= 0.96.93
+BuildRequires: scons
# We build with 'gcc -m32' and that fails on 64 bit platforms when we
# include <gnu/stubs.h>. On x86-64, this is provided by
@@ -37,6 +37,8 @@
# non-x86 architectures.
BuildRequires: /usr/lib/libwx_baseu-2.8.so
+# since the above two BR
+ExcludeArch: ppc, ppc64
%description
NSIS, the Nullsoft Scriptable Install System, is a script-driven
@@ -51,8 +53,8 @@
%prep
%setup -q -n nsis-%{version}-src
-%patch0 -p1
-%patch1 -p1
+%patch0 -p1 -b .64bit
+%patch1 -p1 -b .debug
%patch100 -p1
@@ -76,14 +78,18 @@
%files
%defattr(-,root,root)
+%doc %{_docdir}/%{name}-%{version}
+%config(noreplace) %{_sysconfdir}/nsisconf.nsh
%{_bindir}/*
-%config(noreplace) %{_sysconfdir}/nsisconf.nsh
-%{_includedir}/nsis
-%doc %{_docdir}/%{name}-%{version}
+#{_includedir}/nsis
%{_datadir}/nsis
%changelog
+* Wed Jan 14 2009 Levente Farkas <lfarkas(a)lfarkas.org> - 2.42-1
+- update to the latest upstream
+- a few small changes
+
* Fri Oct 17 2008 Richard W.M. Jones <rjones(a)redhat.com> - 2.39-5
- Fix the Summary line.
--- ./Source/Plugins.cpp.lfarkas 2009-01-14 17:03:11.000000000 +0100
+++ ./Source/Plugins.cpp 2009-01-14 17:03:58.000000000 +0100
@@ -136,7 +136,7 @@
DWORD prd = FIX_ENDIAN_INT32(sections[i].PointerToRawData);
PIMAGE_EXPORT_DIRECTORY exports = PIMAGE_EXPORT_DIRECTORY(&dlldata[0] + prd + ExportDirVA - va);
DWORD na = FIX_ENDIAN_INT32(exports->AddressOfNames);
- unsigned long *names = (unsigned long*)((unsigned long) exports + (char *) na - ExportDirVA);
+ unsigned int *names = (unsigned int*)((unsigned long) exports + (char *) na - ExportDirVA);
for (unsigned long j = 0; j < FIX_ENDIAN_INT32(exports->NumberOfNames); j++)
{
const string name = string((char*)exports + FIX_ENDIAN_INT32(names[j]) - ExportDirVA);
--- ./Source/ResourceEditor.cpp.lfarkas 2009-01-14 17:04:08.000000000 +0100
+++ ./Source/ResourceEditor.cpp 2009-01-14 17:07:47.000000000 +0100
@@ -665,7 +665,7 @@
rdDir.NumberOfIdEntries = ConvertEndianness(rdDir.NumberOfIdEntries);
CopyMemory(seeker, &rdDir, sizeof(IMAGE_RESOURCE_DIRECTORY));
- crd->m_dwWrittenAt = DWORD(seeker);
+ crd->m_dwWrittenAt = long(seeker);
seeker += sizeof(IMAGE_RESOURCE_DIRECTORY);
for (int i = 0; i < crd->CountEntries(); i++) {
@@ -686,7 +686,7 @@
rDirE.UName.NameString.NameIsString = (crd->GetEntry(i)->HasName()) ? 1 : 0;
CopyMemory(seeker, &rDirE, sizeof(MY_IMAGE_RESOURCE_DIRECTORY_ENTRY));
- crd->GetEntry(i)->m_dwWrittenAt = DWORD(seeker);
+ crd->GetEntry(i)->m_dwWrittenAt = long(seeker);
seeker += sizeof(MY_IMAGE_RESOURCE_DIRECTORY_ENTRY);
}
qDirs.pop();
@@ -702,7 +702,7 @@
rDataE.Size = ConvertEndianness(cRDataE->GetSize());
CopyMemory(seeker, &rDataE, sizeof(IMAGE_RESOURCE_DATA_ENTRY));
- cRDataE->m_dwWrittenAt = DWORD(seeker);
+ cRDataE->m_dwWrittenAt = long(seeker);
seeker += sizeof(IMAGE_RESOURCE_DATA_ENTRY);
qDataEntries.pop();
@@ -714,7 +714,7 @@
while (!qStrings.empty()) {
CResourceDirectoryEntry* cRDirE = qStrings.front();
- PMY_IMAGE_RESOURCE_DIRECTORY_ENTRY(cRDirE->m_dwWrittenAt)->UName.NameString.NameOffset = ConvertEndianness(DWORD(seeker) - DWORD(pbRsrcSec));
+ PMY_IMAGE_RESOURCE_DIRECTORY_ENTRY(cRDirE->m_dwWrittenAt)->UName.NameString.NameOffset = ConvertEndianness(long(seeker) - long(pbRsrcSec));
WCHAR* szName = cRDirE->GetName();
WORD iLen = winchar_strlen(szName) + 1;
@@ -745,7 +745,7 @@
/*
* Set all of the directory entries offsets.
*/
- SetOffsets(m_cResDir, DWORD(pbRsrcSec));
+ SetOffsets(m_cResDir, long(pbRsrcSec));
}
// Sets the offsets in directory entries
@@ -868,7 +868,7 @@
// Returns -1 if can not be found
int CResourceDirectory::Find(WCHAR* szName) {
if (IS_INTRESOURCE(szName))
- return Find((WORD) (DWORD) szName);
+ return Find((WORD) (long) szName);
else
if (szName[0] == '#')
return Find(WORD(winchar_stoi(szName + 1)));
@@ -946,7 +946,7 @@
if (IS_INTRESOURCE(szName)) {
m_bHasName = false;
m_szName = 0;
- m_wId = (WORD) (DWORD) szName;
+ m_wId = (WORD) (long) szName;
}
else {
m_bHasName = true;
@@ -960,7 +960,7 @@
if (IS_INTRESOURCE(szName)) {
m_bHasName = false;
m_szName = 0;
- m_wId = (WORD) (DWORD) szName;
+ m_wId = (WORD) (long) szName;
}
else {
m_bHasName = true;
--- ./Source/DialogTemplate.cpp.lfarkas 2009-01-14 16:56:31.000000000 +0100
+++ ./Source/DialogTemplate.cpp 2009-01-14 17:01:14.000000000 +0100
@@ -74,7 +74,7 @@
if (IS_INTRESOURCE(x)) { \
*(WORD*)seeker = 0xFFFF; \
seeker += sizeof(WORD); \
- *(WORD*)seeker = ConvertEndianness(WORD(DWORD(x))); \
+ *(WORD*)seeker = ConvertEndianness(WORD(long(x))); \
seeker += sizeof(WORD); \
} \
else { \
@@ -622,7 +622,7 @@
}
}
- assert((DWORD) seeker - (DWORD) pbDlg == dwSize);
+ assert((long) seeker - (long) pbDlg == dwSize);
// DONE!
return pbDlg;
--- ./Source/mmap.cpp.lfarkas 2009-01-14 17:00:12.000000000 +0100
+++ ./Source/mmap.cpp 2009-01-14 17:01:36.000000000 +0100
@@ -322,7 +322,7 @@
if (!pView)
return;
- unsigned int alignment = ((unsigned int)pView) % m_iAllocationGranularity;
+ unsigned int alignment = ((unsigned long)pView) % m_iAllocationGranularity;
pView = (char *)pView - alignment;
size += alignment;
#ifdef _WIN32
--- ./Source/util.cpp.lfarkas 2009-01-14 17:07:59.000000000 +0100
+++ ./Source/util.cpp 2009-01-14 17:09:25.000000000 +0100
@@ -75,9 +75,9 @@
}
if (width != 0) {
- LONG biWidth;
+ DWORD biWidth;
fseek(f, 18, SEEK_SET); // Seek to the width member of the header
- fread(&biWidth, sizeof(LONG), 1, f);
+ fread(&biWidth, sizeof(DWORD), 1, f);
FIX_ENDIAN_INT32_INPLACE(biWidth);
if (width != biWidth) {
fclose(f);
@@ -86,12 +86,12 @@
}
if (height != 0) {
- LONG biHeight;
+ DWORD biHeight;
fseek(f, 22, SEEK_SET); // Seek to the height member of the header
- fread(&biHeight, sizeof(LONG), 1, f);
+ fread(&biHeight, sizeof(DWORD), 1, f);
FIX_ENDIAN_INT32_INPLACE(biHeight);
// Bitmap height can be negative too...
- if (height != abs(biHeight)) {
+ if (height != abs((long int)biHeight)) {
fclose(f);
return -3;
}
--- ./Source/Platform.h.lfarkas 2009-01-14 17:01:43.000000000 +0100
+++ ./Source/Platform.h 2009-01-14 17:03:03.000000000 +0100
@@ -165,7 +165,7 @@
# define MAKEINTRESOURCE MAKEINTRESOURCEA
# endif
# ifndef IMAGE_FIRST_SECTION
-# define IMAGE_FIRST_SECTION(h) ( PIMAGE_SECTION_HEADER( (DWORD) h + \
+# define IMAGE_FIRST_SECTION(h) ( PIMAGE_SECTION_HEADER( (long) h + \
FIELD_OFFSET(IMAGE_NT_HEADERS, OptionalHeader) + \
FIX_ENDIAN_INT16(PIMAGE_NT_HEADERS(h)->FileHeader.SizeOfOptionalHeader) ) )
# endif
@@ -197,7 +197,7 @@
#endif
#ifndef ULONG_PTR
-# define ULONG_PTR DWORD
+# define ULONG_PTR ULONG
#endif
#ifndef IDC_HAND
@@ -702,7 +702,7 @@
WORD e_oemid;
WORD e_oeminfo;
WORD e_res2[10];
- LONG e_lfanew;
+ DWORD e_lfanew;
} IMAGE_DOS_HEADER,*PIMAGE_DOS_HEADER;
# pragma pack()
# pragma pack(4)
--- ./SCons/Config/gnu.lfarkas 2009-01-14 16:55:33.000000000 +0100
+++ ./SCons/Config/gnu 2009-01-14 16:56:21.000000000 +0100
@@ -90,8 +90,6 @@
makensis_env.Append(CXXFLAGS = ['-Wno-non-virtual-dtor']) # ignore virtual dtor warnings
conf = FlagsConfigure(makensis_env)
-conf.CheckCompileFlag('-m32') #
-conf.CheckLinkFlag('-m32') #
conf.CheckLinkFlag('$MAP_FLAG') # generate map file
if not defenv['DEBUG'] and defenv['STRIP'] and defenv['STRIP_CP']:
TestStrip(conf) # strip
--- ./SConstruct.debug 2008-12-12 17:33:25.000000000 +0100
+++ ./SConstruct 2009-01-14 17:29:41.000000000 +0100
@@ -157,6 +157,8 @@
opts.Add(('APPEND_LINKFLAGS', 'Additional linker flags'))
# build options
opts.Add(BoolOption('DEBUG', 'Build executables with debugging information', 'no'))
+opts.Add(BoolOption('DEBUG_SYMBOLS', 'Build with debugging information, but none of the side effects of DEBUG', 'no'))
+opts.Add(BoolOption('OPT', 'Build with optimization', 'yes'))
opts.Add(PathOption('CODESIGNER', 'A program used to sign executables', None))
opts.Add(BoolOption('STRIP', 'Strips executables of any unrequired data such as symbols', 'yes'))
opts.Add(BoolOption('STRIP_CP', 'Strips cross-platform executables of any unrequired data such as symbols', 'yes'))
--- ./SCons/Config/gnu.debug 2009-01-14 17:24:59.000000000 +0100
+++ ./SCons/Config/gnu 2009-01-14 17:29:02.000000000 +0100
@@ -66,8 +66,11 @@
stub_env = defenv.Clone()
cross_env(stub_env)
-if not defenv['DEBUG']:
- stub_env.Append(CCFLAGS = ['-Os']) # optimize for size
+if defenv['DEBUG_SYMBOLS']:
+ stub_env.Append(LINKFLAGS = '-g') # debugging
+ stub_env.Append(CCFLAGS = '-g') # debugging
+if not defenv['DEBUG'] and defenv['OPT']:
+ stub_env.Append(CCFLAGS = ['-O2']) # optimize
stub_env.Append(CCFLAGS = ['-Wall']) # all warnings
stub_env.Append(CCFLAGS = ['-xc']) # force compile as c
stub_env.Append(CCFLAGS = ['-fno-strict-aliasing']) # not safe for strict aliasing
@@ -83,15 +86,18 @@
### makensis environment
makensis_env = defenv.Clone()
-
-if not defenv['DEBUG']:
- makensis_env.Append(CCFLAGS = ['-O2']) # optimize
+
+if defenv['DEBUG_SYMBOLS']:
+ makensis_env.Append(LINKFLAGS = '-g') # debugging
+ makensis_env.Append(CCFLAGS = '-g') # debugging
+if not defenv['DEBUG'] and defenv['OPT']:
+ makensis_env.Append(CCFLAGS = ['-O2']) # optimize
makensis_env.Append(CCFLAGS = ['-Wall']) # all warnings
makensis_env.Append(CXXFLAGS = ['-Wno-non-virtual-dtor']) # ignore virtual dtor warnings
conf = FlagsConfigure(makensis_env)
conf.CheckLinkFlag('$MAP_FLAG') # generate map file
-if not defenv['DEBUG'] and defenv['STRIP'] and defenv['STRIP_CP']:
+if not defenv['DEBUG'] and not defenv['DEBUG_SYMBOLS'] and defenv['STRIP'] and defenv['STRIP_CP']:
TestStrip(conf) # strip
conf.Finish()
@@ -100,13 +106,16 @@
plugin_env = defenv.Clone()
cross_env(plugin_env)
-if not defenv['DEBUG']:
- plugin_env.Append(CCFLAGS = ['-Os']) # optimize for size
+if defenv['DEBUG_SYMBOLS']:
+ plugin_env.Append(LINKFLAGS = '-g') # debugging
+ plugin_env.Append(CCFLAGS = '-g') # debugging
+if not defenv['DEBUG'] and defenv['OPT']:
+ plugin_env.Append(CCFLAGS = ['-O2']) # optimize
plugin_env.Append(CCFLAGS = ['-Wall']) # level 3 warnings
plugin_env.Append(CCFLAGS = ['-fno-strict-aliasing']) # not safe for strict aliasing
if not defenv['DEBUG'] and defenv['STRIP'] and defenv['STRIP_W32']:
- plugin_env.Append(LINKFLAGS = ['-s']) # strip
+ plugin_env.Append(LINKFLAGS = ['-s']) # strip
plugin_env.Append(LINKFLAGS = ['-mwindows']) # build windows executables
plugin_env.Append(LINKFLAGS = ['$ALIGN_FLAG']) # 512 bytes align
plugin_env.Append(LINKFLAGS = ['$MAP_FLAG']) # generate map file
@@ -115,7 +124,10 @@
cp_util_env = defenv.Clone()
-if not defenv['DEBUG']:
+if defenv['DEBUG_SYMBOLS']:
+ cp_util_env.Append(LINKFLAGS = '-g') # debugging
+ cp_util_env.Append(CCFLAGS = '-g') # debugging
+if not defenv['DEBUG'] and defenv['OPT']:
cp_util_env.Append(CCFLAGS = ['-O2']) # optimize
cp_util_env.Append(CCFLAGS = ['-Wall']) # all warnings
cp_util_env.Append(CCFLAGS = ['-fno-strict-aliasing']) # not safe for strict aliasing
@@ -149,6 +161,9 @@
### test environment
test_env = defenv.Clone()
+if defenv['DEBUG_SYMBOLS']:
+ test_env.Append(LINKFLAGS = '-g') # debugging
+ test_env.Append(CCFLAGS = '-g') # debugging
conf = FlagsConfigure(test_env)
conf.CheckCompileFlag('-m32')
conf.CheckLinkFlag('-m32')
15 years, 2 months
Minimal, mostly working Qt package
by Richard W.M. Jones
I've added a Qt package (mingw32-qt-win). The sources are in the
Mercurial repo:
http://hg.et.redhat.com/cgi-bin/hg-misc.cgi/fedora-mingw--devel/file/tip/...
and I'm building it for the temporary repository now, so it will
appear there later today.
This only includes a subset of Qt - basically just QtCore, QtNetwork,
QtXml and QtGui. Building the rest isn't difficult, but I want to
leave this to someone who cares about Qt more, to take over and extend
this package.
I built an example application
(http://doc.trolltech.com/4.0/mainwindows-application.html) and that
works except that for some reason it couldn't find the resource icons.
Screenshot of the running application is attached.
This package is GPL and so not suitable for building commercial
software. This should be resolved when Qt 4.5 is released later this
year.
Rich.
--
Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones
virt-top is 'top' for virtual machines. Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://et.redhat.com/~rjones/virt-top
15 years, 2 months
Thoughts on Qt
by Richard W.M. Jones
Inspired by a talk I listened to yesterday about Qt, I had a look at
packaging Qt. It's non-trivial, but here are my thoughts ..
We need to start with the Qt-Win (open source version). Version 4.4.3
which I looked at is GPL, but upcoming version 4.5 will be under LGPL
so allowing commercial development. Nevertheless we can practice
packaging using 4.4.3.
Comes with a "configure.exe" program. This needs to be run under
Wine, so we cannot use it for cross-compilation. Even though we have
the source for configure.exe, that doesn't help because it has to be
compiled for the Win32 API so would still need to be run under Wine.
Instead, I run configure.exe by hand, and capture the files created &
modified in a patch.
Uses a custom build system, qmake, and of course qmake doesn't fully
understand cross-compilation. Ugh! We can run the native qmake (from
qt-devel package) with the -win32 option, which is promising but it
generates and tests files with \ in the names. I'm still working on
this.
This page is a little bit useful: http://silmor.de/38
You can find the initial work on this in the Mercurial repo, but don't
expect anything usable at the moment.
Rich.
--
Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones
Read my OCaml programming blog: http://camltastic.blogspot.com/
Fedora now supports 68 OCaml packages (the OPEN alternative to F#)
http://cocan.org/getting_started_with_ocaml_on_red_hat_and_fedora
15 years, 2 months
rpms/mingw32-filesystem/devel mingw32-filesystem.spec, 1.13, 1.14 mingw32-macros.mingw32, 1.8, 1.9
by Richard W.M. Jones
Author: rjones
Update of /cvs/pkgs/rpms/mingw32-filesystem/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv25858
Modified Files:
mingw32-filesystem.spec mingw32-macros.mingw32
Log Message:
Unset PKG_CONFIG_PATH because /usr/lib/rpm/macros sets it (Erik van Pienbroek).
Index: mingw32-filesystem.spec
===================================================================
RCS file: /cvs/pkgs/rpms/mingw32-filesystem/devel/mingw32-filesystem.spec,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- mingw32-filesystem.spec 30 Jan 2009 09:38:05 -0000 1.13
+++ mingw32-filesystem.spec 1 Feb 2009 23:15:40 -0000 1.14
@@ -1,7 +1,7 @@
%define debug_package %{nil}
Name: mingw32-filesystem
-Version: 45
+Version: 46
Release: 1%{?dist}
Summary: MinGW base filesystem and environment
@@ -153,6 +153,10 @@
%changelog
+* Sun Feb 1 2009 Richard W.M. Jones <rjones(a)redhat.com> - 46-1
+- Unset PKG_CONFIG_PATH because /usr/lib/rpm/macros sets it (Erik van
+ Pienbroek).
+
* Wed Jan 28 2009 Richard W.M. Jones <rjones(a)redhat.com> - 45-1
- Use PKG_CONFIG_LIBDIR instead of PKG_CONFIG_PATH so that native pkgconfig
is never searched.
Index: mingw32-macros.mingw32
===================================================================
RCS file: /cvs/pkgs/rpms/mingw32-filesystem/devel/mingw32-macros.mingw32,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- mingw32-macros.mingw32 30 Jan 2009 09:38:05 -0000 1.8
+++ mingw32-macros.mingw32 1 Feb 2009 23:15:40 -0000 1.9
@@ -55,6 +55,7 @@
%_mingw32_env HOST_CC=gcc; export HOST_CC; \
PKG_CONFIG_LIBDIR="%{_mingw32_libdir}/pkgconfig"; export PKG_CONFIG_LIBDIR; \
+ unset PKG_CONFIG_PATH; \
_PREFIX="%{_bindir}/%{_mingw32_target}-"; \
for i in `ls -1 ${_PREFIX}* | grep -v 'gcc-'`; do \
x=`echo $i|sed "s,${_PREFIX},,"|tr "a-z+-" "A-ZX_"`; \
15 years, 2 months