You are not logged in.

#1 2007-10-18 09:38:59

jinn
Member
From: Gothenburg
Registered: 2005-12-10
Posts: 506

wxhaskell

Can anyone create a pkgbuild for wxhaskell? I have troubles installing it manually..

Wxhaskell: gui programming for haskell with Wxwidgets.

http://wxhaskell.sourceforge.net/


The ultimate Archlinux release name: "I am your father"

Offline

#2 2007-10-18 10:52:00

jinn
Member
From: Gothenburg
Registered: 2005-12-10
Posts: 506

Re: wxhaskell

seems like I need alot of libs for ghc.
1. libghc6-hunit
2. libghc6-mtl
3. libghc6-time

Couldnt find any sources to install manually. but packages exists for ubuntu..

-- Edit
ofcourse you need wxwidgets also.. I installed wxgtk.

Last edited by jinn (2007-10-18 10:54:39)


The ultimate Archlinux release name: "I am your father"

Offline

#3 2007-10-18 11:04:48

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: wxhaskell

i know that mtl is included in ghc. Ubuntu just chose to seperate it out. The others are probably included too. Take a look at the haskell-x11 package on the AUR, you might be able to modify that if wxhaskell has a similar build.


James

Offline

#4 2007-10-18 16:39:10

jinn
Member
From: Gothenburg
Registered: 2005-12-10
Posts: 506

Re: wxhaskell

hmm.. As you said.. All those libs are already included. Installed haddock, but did not help either. this is error message trying to compile:

[18:37 root wxhaskell-0.9.4]# make
g++ -c wxc/src/ewxw_main.cpp -o out/wxc/ewxw_main.o -MD -I/usr/lib/wx/include/gtk2-unicode-release-2.8 -I/usr/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -pthread -Iwxc/include
In file included from wxc/src/ewxw_main.cpp:1:
wxc/include/wrapper.h: In constructor 'ELJDragDataObject::ELJDragDataObject(void*, char*, int (*)(void*), int (*)(void*, void*), int (*)(void*, int, const void*))':
wxc/include/wrapper.h:172: error: no matching function for call to 'wxDataObjectSimple::wxDataObjectSimple(char*&)'
/usr/include/wx-2.8/wx/dataobj.h:249: note: candidates are: wxDataObjectSimple::wxDataObjectSimple(const wxDataObjectSimple&)
/usr/include/wx-2.8/wx/dataobj.h:202: note:                 wxDataObjectSimple::wxDataObjectSimple(const wxDataFormat&)
wxc/include/wrapper.h: In constructor 'ELJTextValidator::ELJTextValidator(void*, void*, void*, long int)':
wxc/include/wrapper.h:257: error: ambiguous overload for 'operator=' in '((ELJTextValidator*)this)->ELJTextValidator::buf = (const char*)_txt'
/usr/include/wx-2.8/wx/string.h:676: note: candidates are: wxString& wxString::operator=(int) <near match>
/usr/include/wx-2.8/wx/string.h:956: note:                 wxString& wxString::operator=(wxChar) <near match>
/usr/include/wx-2.8/wx/string.h:970: note:                 wxString& wxString::operator=(const wxWCharBuffer&) <near match>
/usr/include/wx-2.8/wx/string.h:660: note:                 wxString& wxString::operator=(const wxString&) <near match>
wxc/include/wrapper.h: At global scope:
wxc/include/wrapper.h:330: error: conflicting return type specified for 'virtual char* ELJConnection::OnRequest(const wxString&, const wxString&, int*, wxIPCFormat)'
/usr/include/wx-2.8/wx/ipcbase.h:81: error:   overriding 'virtual wxChar* wxConnectionBase::OnRequest(const wxString&, const wxString&, int*, wxIPCFormat)'
wxc/include/wrapper.h: In constructor 'ELJConnection::ELJConnection(char*, int)':
wxc/include/wrapper.h:300: error: no matching function for call to 'wxTCPConnection::wxTCPConnection(char*&, int&)'
/usr/include/wx-2.8/wx/sckipc.h:99: note: candidates are: wxTCPConnection::wxTCPConnection(const wxTCPConnection&)
/usr/include/wx-2.8/wx/sckipc.h:61: note:                 wxTCPConnection::wxTCPConnection()
/usr/include/wx-2.8/wx/sckipc.h:60: note:                 wxTCPConnection::wxTCPConnection(wxChar*, int)
wxc/include/wrapper.h: In constructor 'ELJPrintout::ELJPrintout(void*, void*, void*, void*, void*, void*, void*, void*, void*, void*)':
wxc/include/wrapper.h:412: error: conversion from 'char*' to 'const wxString' is ambiguous
/usr/include/wx-2.8/wx/string.h:692: note: candidates are: wxString::wxString(wxChar, size_t) <near match>
/usr/include/wx-2.8/wx/string.h:682: note:                 wxString::wxString(int) <near match>
wxc/include/wrapper.h: In constructor 'ELJPreviewFrame::ELJPreviewFrame(void*, void*, void*, void*, void*, void*, void*, int, int, int, int, int)':
wxc/include/wrapper.h:474: error: conversion from 'char*' to 'const wxString' is ambiguous
/usr/include/wx-2.8/wx/string.h:692: note: candidates are: wxString::wxString(wxChar, size_t) <near match>
/usr/include/wx-2.8/wx/string.h:682: note:                 wxString::wxString(int) <near match>
wxc/include/wrapper.h: At global scope:
wxc/include/wrapper.h:534: error: default argument for parameter of type 'const wxString&' has type 'const char [11]'
wxc/src/ewxw_main.cpp: In function 'void ELJApp_InitializeC(wxClosure*, int, char**)':
wxc/src/ewxw_main.cpp:106: warning: deprecated conversion from string constant to 'char*'
make: *** [out/wxc/ewxw_main.o] Error 1
[18:37 root wxhaskell-0.9.4]#

according to the note given by ./configure to install it I only need to do:
1. make
2. make install

So I dont think the haskell-x11 pkgbuild is of any help.


The ultimate Archlinux release name: "I am your father"

Offline

#5 2007-10-19 02:58:50

tardo
Member
Registered: 2006-07-15
Posts: 526

Re: wxhaskell

try using wx2.6 instead of 2.8

Offline

#6 2007-10-19 05:38:36

jinn
Member
From: Gothenburg
Registered: 2005-12-10
Posts: 506

Re: wxhaskell

[7:35 root wxhaskell_0]# ./configure
checking system:
 wx-config found
 ghc found
 ghc-pkg found
 haddock found
 install program found

creating configuration files:
 config
 config/config.mk
 config/wxcore.pkg
 config/wx.pkg
 config/wxhaskell-register.bat
 config/wxhaskell-unregister.bat
 config/setcd
 config/macosx-install.info
 config/macosx-postinstall
 config/macosx-app
 config/wxhaskell.spec
 config/prologue.txt
 config/cache.txt

configuration:
 library:     wxhaskell-0.10.1  (release 0)
 compiler:    ghc-6.6
 wxwidgets:   gtk-2.6.4
 with openGL: no
 with stc:    no
 library dir: /usr/lib

done:
 type 'make' to build wxhaskell.
 type 'make install' to install wxhaskell.
 type 'make help' to receive help on all other make targets

[7:35 root wxhaskell_0]# make
out/wxdirect/wxdirect -s wxSTC-D3/stc.h --wxc wxc -o wxc
parsing: wxSTC-D3/stc.h
generating: wxc/include/stc_gen.h
generating: wxc/src/stc_gen.cpp
out/wxdirect/wxdirect -s wxSTC-D3/stc.h --wxc wxc -o wxc
parsing: wxSTC-D3/stc.h
generating: wxc/include/stc_gen.h
generating: wxc/src/stc_gen.cpp
make: *** No rule to make target `/usr/include/wx-2.8/wx/wx.h', needed by `out/wxc/ewxw_main.o'.  Stop.
[7:35 root wxhaskell_0]#

So I removed wxgtk (v2.8) to force it to use 2.6.. I had to do this:
ln -s /usr/bin/wx-config-26 /usr/bin/wx-config

in order to make it work. But now It wants 2.8?


The ultimate Archlinux release name: "I am your father"

Offline

#7 2007-10-19 06:14:04

jinn
Member
From: Gothenburg
Registered: 2005-12-10
Posts: 506

Re: wxhaskell

Alright! it worked. I need some help creating the pkgbuild now. For it to compile correctly I had to edit the configure file, and change wx-config to wx-config-2.6.. How can I do this in the PKGBUILD? Everything else is done.

it looks like this in configure file:

# wxwidgets
wxconfig="wx-config-2.6"

It seems like it needed both wxgtk v2.8 and v2.6.

Last edited by jinn (2007-10-19 06:25:42)


The ultimate Archlinux release name: "I am your father"

Offline

#8 2007-10-19 06:16:34

tardo
Member
Registered: 2006-07-15
Posts: 526

Re: wxhaskell

it shouldn't and you shouldn't use both. to edit the file, try writing a patch, else sed usually works.

Offline

#9 2007-10-19 06:36:10

jinn
Member
From: Gothenburg
Registered: 2005-12-10
Posts: 506

Re: wxhaskell

well I guess time has came for me to learn howto write a patch.. Any good online tuts for this?

Why should it not use both? I get this error when removing v2.8:
make: *** No rule to make target `/usr/include/wx-2.8/wx/wx.h', needed by `out/wxc/ewxw_main.o'.  Stop.

I used the darcs version of wxhaskell when compiling.. dont know if this is relevant in some way.. If I want to use the darcs version in the pkgbuild instead of source.zip file how can I do this?

this is the command:
darcs get http://darcs.haskell.org/wxhaskell


--EDIT

Alright.. the source.zip file doesnt compile at all. I have to use darcs for the pkgbuild.

Last edited by jinn (2007-10-19 06:40:40)


The ultimate Archlinux release name: "I am your father"

Offline

#10 2007-10-19 06:50:47

tardo
Member
Registered: 2006-07-15
Posts: 526

Re: wxhaskell

google "diff patch". lots of tutorials for that. creation is simple: diff -Naur oldfile newfile > name.patch

as for wx, if possible use wx2.8. you may have to write patches to make it compatible. if that fails, fall back to wx2.6. somewhere in the makefiles/configure it's trying to include /usr/include/wx-2.8, just find it and change to 2.6

Offline

#11 2007-10-19 17:04:43

jinn
Member
From: Gothenburg
Registered: 2005-12-10
Posts: 506

Re: wxhaskell

ok.. the patch is done, but how do I get the source with darcs in the pkgbuild? is it similar to svn pkgbuilds?


The ultimate Archlinux release name: "I am your father"

Offline

#12 2007-10-19 19:35:00

tardo
Member
Registered: 2006-07-15
Posts: 526

Re: wxhaskell

yes, look in the wiki for arch cvs/svn guidelines, here should be a darcs prototype there.

Offline

#13 2007-10-20 06:50:30

jinn
Member
From: Gothenburg
Registered: 2005-12-10
Posts: 506

Re: wxhaskell

nice! Just finished the pkgbuild. Added to AUR, thanks for the guidelines and help.

Do vote for it big_smile

Last edited by jinn (2007-10-20 06:53:18)


The ultimate Archlinux release name: "I am your father"

Offline

#14 2008-02-05 12:04:37

skorpan
Member
Registered: 2007-11-09
Posts: 81

Re: wxhaskell

Unfortunately the package doesn't install for me (and I do need it really badly). However, I can't even get it to work when trying to install it from source on my own.

==> Starting build
patching file configure
checking system:
 wx-config found
 ghc found
 ghc-pkg found
 haddock found
 install program found

creating configuration files:
 config
 config/config.mk
 config/wxcore.pkg
 config/wx.pkg
 config/wxhaskell-register.bat
 config/wxhaskell-unregister.bat
 config/setcd
 config/macosx-install.info
 config/macosx-postinstall
 config/macosx-app
 config/wxhaskell.spec
 config/prologue.txt
 config/cache.txt

configuration:
 library:     wxhaskell-0.10.1  (release 0)
 compiler:    ghc-6.8.2
 wxwidgets:   gtk-2.6.4
 with openGL: yes
 with stc:    no
 library dir: /usr/lib

done:
 type 'make' to build wxhaskell.
 type 'make install' to install wxhaskell.
 type 'make help' to receive help on all other make targets

<COMPILING FOR QUITE A WHILE, SNIPPED OUT (nothing interesting)>

install: /tmp/yaourt-tmp-deniz/aur-wxhaskell-darcs/wxhaskell-darcs/pkg/usr/lib/wxcore.pkg
cat config/wxcore.pkg | sed -e "s|\${wxhlibdir}|/usr/lib|" | ghc-pkg update -
Reading package info from stdin ... done.
WARNING: unversioned dependencies are deprecated, and will NOT be accepted by GHC 6.10: base haskell98
Unable to rename "/usr/lib/ghc-6.8.2/package.conf" to "/usr/lib/ghc-6.8.2/package.conf.old"
Saving old package config file... ghc-pkg.bin: /usr/lib/ghc-6.8.2/package.conf: renameFile: permission denied (Permission denied)

make: *** [wxcore-register] Error 1
rm -f -r out/wx/*
rmdir out/wx
ghc -c wx/src/Graphics/UI/WX/Types.hs -o out/wx/imports/Graphics/UI/WX/Types.o -iout/wx/imports -odir out/wx/imports -hidir out/wx/imports  -fvia-C -package-name wx-0.10.1 -package wxcore-0.10.1
ghc-6.8.2: unknown package: wxcore-0.10.1
make: *** [out/wx/imports/Graphics/UI/WX/Types.o] Error 1
ghc -c wx/src/Graphics/UI/WX/Types.hs -o out/wx/imports/Graphics/UI/WX/Types.o -iout/wx/imports -odir out/wx/imports -hidir out/wx/imports  -fvia-C -package-name wx-0.10.1 -package wxcore-0.10.1
ghc-6.8.2: unknown package: wxcore-0.10.1
make: *** [out/wx/imports/Graphics/UI/WX/Types.o] Error 1
==> ERROR: Build Failed.
    Aborting...
Error: Makepkg was unable to build wxhaskell-darcs package.

Offline

#15 2008-02-05 12:22:46

skorpan
Member
Registered: 2007-11-09
Posts: 81

Re: wxhaskell

It seems to work when I "sudo yaourt wxhaskell", but shouldn't packages take care of that automatically?

Offline

#16 2008-02-05 22:56:14

Stefan Husmann
Member
From: Germany
Registered: 2007-08-07
Posts: 1,391

Re: wxhaskell

skorpan wrote:

It seems to work when I "sudo yaourt wxhaskell", but shouldn't packages take care of that automatically?

this line says that the package tries to rename a file where it hasn't got permissions too rename.

Offline

#17 2008-02-10 22:14:43

skorpan
Member
Registered: 2007-11-09
Posts: 81

Re: wxhaskell

Stefan Husmann wrote:
skorpan wrote:

It seems to work when I "sudo yaourt wxhaskell", but shouldn't packages take care of that automatically?

this line says that the package tries to rename a file where it hasn't got permissions too rename.

That might be so, but shouldn't yaourt automatically (or perhaps the PKGBUILD tell yaourt to) ask the user for the root password if such privileges are needed for installing?

Offline

#18 2008-02-18 08:37:08

Stefan Husmann
Member
From: Germany
Registered: 2007-08-07
Posts: 1,391

Re: wxhaskell

skorpan wrote:
Stefan Husmann wrote:
skorpan wrote:

It seems to work when I "sudo yaourt wxhaskell", but shouldn't packages take care of that automatically?

this line says that the package tries to rename a file where it hasn't got permissions too rename.

That might be so, but shouldn't yaourt automatically (or perhaps the PKGBUILD tell yaourt to) ask the user for the root password if such privileges are needed for installing?

Yes, but the error message says that the renaming is tried at build time. This should never be done by a build script but only my pacman. The PKGBUILD is broken.

Offline

Board footer

Powered by FluxBB