Giter VIP home page Giter VIP logo

wxhaskell's People

Contributors

gwern avatar heinrichapfelmus avatar jodonoghue avatar kowey avatar mmakowski avatar shelarcy avatar yihuang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

wxhaskell's Issues

Cannot find wxc install directory when using cabal-dev

Issue reported by Eric Kow. See http://permalink.gmane.org/gmane.comp.lang.haskell.wxhaskell.devel/829

Users of cabal-dev may find that the wxc include dir does not have
wxc anywhere in its path, eg.
/home/moi/my-package/cabal-dev//lib//include
So instead we try looking for the wxc.h file itself.
] {
hunk ./wxcore/Setup.hs 1
-import Control.Monad (when)
+import Control.Monad (when, filterM)
import Data.List (foldl', intersperse, intercalate, nub, lookup, isPrefixOf, isInfixOf, find)
import Data.Maybe (fromJust)
import Distribution.PackageDescription hiding (includeDirs)
hunk ./wxcore/Setup.hs 37
-- It works by finding the wxc package's installation info, then finding the include directory
-- which contains wxc's headers (amongst the wxWidgets include dirs) and then going up a level.
-- It would be nice the path was park of InstalledPackageInfo, but it isn't.
-wxcInstallDir :: LocalBuildInfo -> FilePath
+wxcInstallDir :: LocalBuildInfo -> IO FilePath
wxcInstallDir lbi =
case searchByName (installedPkgs lbi) "wxc" of
hunk ./wxcore/Setup.hs 40

  •    Unambiguous wxc_pkgs -> case find (isInfixOf "wxc") . includeDirs . head $ wxc_pkgs of
    
  •        Just wxcIncludeDir -> takeDirectory wxcIncludeDir
    
  •        Nothing -> error "wxcInstallDir: Couldn't find wxc include dir"
    
  •    Unambiguous (wxc_pkg:_) -> do
    
  •        wxc <- filterM (doesFileExist . (</> "wxc.h")) (includeDirs wxc_pkg)
    
  •        case wxc of
    
  •            [wxcIncludeDir] -> return (takeDirectory wxcIncludeDir)
    
  •            [] -> error "wxcInstallDir: Couldn't find wxc include dir"
    
  •            _  -> error "wxcInstallDir: I'm confused. I see more than one wxc include directory from the same package"
    
  •    Unambiguous [] -> error "wxcInstallDir: Cabal says wxc is installed, but gives no package info for it"
    _ -> error "wxcInstallDir: Couldn't find wxc package in installed packages"
    

    hunk ./wxcore/Setup.hs 56
    createDirectoryIfMissing True wxcoreDirectory

    lbi <- confHook simpleUserHooks (pkg0, pbi) flags

  • let wxcDirectory = wxcInstallDir lbi

  •    wxcoreIncludeFile = wxcDirectory </> "include/wxc.h"
    
  • wxcDirectory <- wxcInstallDir lbi

  • let wxcoreIncludeFile = wxcDirectory </> "include/wxc.h"

putStrLn "Generating class type definitions from .h files"
system $ "wxdirect -t --wxc " ++ wxcDirectory ++ " -o " ++ wxcoreDirectory ++ " " ++ wxcoreIncludeFile
}

Command Line Args broken

See example code below. Running this program with any command line args that cause WX's 'start' to be run (in this case, anything other than "terminal"), results in a crash, with a popup error window complaining about an 'unexpected parameter'.

import Graphics.UI.WX
import System.Environment (getArgs)

gui = do
fr <- frame [text := "GUI calculation"]
t <- staticText fr [text := "Enter a number below"]
n <- entry fr []
let foo = do
v <- read <$> get n text
set t [text := "Your number * 3 is " ++ show (v * 3 :: Int) ]
b <- button fr [text := "Calculate", on command := foo]
set fr [layout := column 3 [widget t, widget n, widget b] ]

terminal = do
putStrLn "Enter a number"
v <- read <$> getLine
putStrLn $ "Your number * 3 is " ++ (show $ v * 3)

main = do
a <- getArgs
case a of
("terminal"):_ -> terminal
("gui"):_ -> start gui
_ -> start gui

I've gone as far as rewriting Graphics.UI.WXCore.Event.appOnInit, which appears to be responsible for passing command line args to the rest of the wx initialization code. In my test case in the code linked above, the rewritten version assures that no args are passed to the new appOnInit, and yet the program still crashes with the same error, with WX still somehow able to see the command line args, despite the args not being passed to (the new version of) 'start', 'run' or 'appOnInit' explicitly.

Random crashes in Windows upon use of (:~) with Event

  1. When (:~) is used with set ... [on command ...], program crashes, and prints Segmentation fault/access violation in generated code message;
  2. Crashes occur frequently, but not always;
  3. In case when tested with only one object, crash never happens immediately after start;
  4. Upon use of (:=), everything works fine;
  5. Sample code is provided.

This issue was fully decribed in HeinrichApfelmus/reactive-banana#62.

  • when line with (:=), marked with a comment, is used, everything is perfectly fine
  • when (:~) is used, random crashes occur frequently.
> import Control.Monad (replicateM, mapM_)
> import Graphics.UI.WX

> main = start $ do
>        pad     <- frame [ ]                     
>        buttons <- replicateM 2
>                 $ button pad  []

>        mapM_ (flip set [on command := return ()]) buttons -- OK
>        mapM_ (flip set [on command :~ const (return ())]) buttons

Assert failure: wxEXPAND flag will be overridden by alignment flags

I have a non-trivial GUI application that recently shows a failure dialog on startup:

ASSERT INFO:
./src/common/sizer.cpp(1624): assert "CheckSizerFlags ( !(flags & (wxALIGN_BOTTOM | wxALIGN_CENTRE_VERTICAL)) || !(flags & (wxALIGN_RIGHT | wxALIGN_CENTRE_HORIZONTAL)) )" failed in DoInsert(): wxEXPAND flag will be overridden by alignment flags

DO NOT PANIC !!

If you're an end user running a program not developed by you, please ignore this message, it is harmless, and please try reporting the problem to the program developers.

You may also set WXSUPPRESS_SIZER_FLAGS_CHECK environment variable to suppress all such checks when running this program.

If you're the developer, simply remove either wxEXPAND or the alignment in at least one direction from your code to avoid getting this message. You can also call wxSizerFlags::DisableConsistencyChecks() to globally disable all such checks, but this is strongly not recommended.

BACKTRACE:
[1] wxGridSizer::DoInsert(unsigned long, wxSizerItem*)
[2] cdcXS_info ghc_116.c

However, I have not used wxEXPAND in my code. I guess it is implicitly used in wxhaskell code. I'm still investigating what widget actually causes this failure. What can I do to pinpoint the cause?

I am using wx-0.93.0.0 and wxwidgets-3.2.4.

Unresolved QuickTime dependency on Mac OS X?

Issue reported by Conal Elliott ([email protected] - see http://permalink.gmane.org/gmane.comp.lang.haskell.wxhaskell.general/1192)

I installed wxWidgets-devel-2.9.3 via macports and then wxHaskell, and I get the following when trying to run a simple wxHaskell program in ghci:

Loading package wxc-0.90.0.2 ... can't load framework: QuickTime (dlopen(/System/Library/Frameworks/QuickTime.framework/QuickTime, 9): no suitable image found.  Did find:
    /System/Library/Frameworks/QuickTime.framework/QuickTime: no matching architecture in universal wrapper
    /System/Library/Frameworks/QuickTime.framework/QuickTime: no matching architecture in universal wrapper)

Any suggestions? I'm using Mac OS 10.6.8 and GHC-7.0.4 from the Haskell Platform.

Feature request: Virtual List Control

Issue reported by Fabien Binz - see http://permalink.gmane.org/gmane.comp.lang.haskell.wxhaskell.general/1189

I need to display a quite large number of data in a list control and use the ‘items’ attribute for that purpose. However, I’m not content with the speed of this solution and would like to use a ‘virtual’ list control instead, as it is described here: 1

The problem is, that the necessary constants and functions (i.e. wxLC_VIRTUAL) are not defined by wxHaskell. Is there a technical reason for this or could they be added easily?

wxc: Missing "wxbase" link dependency on Windows using Abriline or Achelanne packs

When building on Windows using Stack (LTS-6.2, GHC 7.10.3, MingGW) I get this list of libraries as dependencies:
"-lstdc++" "-lwxtiff" "-lwxjpeg" "-lwxpng" "-lwxzlib" "-lwxregexu" "-lwxexpat" "-lkernel32" "-luser32" "-lgdi32" "-lcomdlg32" "-lwxregexu" "-lwinspool" "-lwinmm" "-lshell32" "-lcomctl32" "-lole32" "-loleaut32" "-luuid" "-lrpcrt4" "-ladvapi32" "-lwsock32"

There is no wxbase and the linker complains about.

Update Hackage

Right now, the latest wxHaskell on Hackage is 0.92.3.0.
I can't compile it in nixos.
But I can compile wxc in wxHaskell 0.93.0.0 downloaded from github.
Is it possible to update it to hackage to version 0.93.0.0 ?

Building wxc fails (Mac OS X Mavericks 10.9.2)

First of all. Installing wxHaskell is quite possibly the most infuriating thing I ever had to go through.

At least on GNU/Linux, when facing the exact same issue, I could move to wxHaskell 0.13.x. However, that doesn't work for Mac OS X.

Anyways. Here's the issue I'm facing, trying to build wxc on a stock Haskell Platform install (64 bit. Downloaded fresh from the website a few hours ago).

Resolving dependencies...
<command line>: cannot satisfy -package Cabal-1.16.0: 
    Cabal-1.16.0-d214c26e4d6b19238fd48dc760eb56bf is unusable due to missing or recursive dependencies:
      process-1.1.0.2-d20d01635195e5ac2ebee73032c7fe84
    (use -v for more information)
Failed to install wxc-0.91.0.0
cabal: Error: some packages failed to install:
wxc-0.91.0.0 failed during the configure step. The exception was:
ExitFailure 1

Kinda frustrated, as I don't know what this is about and why previous wxHaskell versions would just work whereas those based on wxc-0.90/91.x and wxWidgets 2.9+ are such a pain.

How I prepared the build.
  • Downloaded and installed 64 bit Mac release of the Haskell platform
  • Installed wxWidgets
    • sudo port install wxWidgets-3.0
  • Cloned the repository
    • cd wxdirect
    • cabal install
    • cd ../wxc
    • cabal install

The above error message shows up upon running the second cabal install from within wxc.

[ wxhaskell-Bugs-3534448 ] Unavoidable beeping on enter inside text controls.

[Copied from Sourceforge bug tracker]

Bugs item #3534448, was opened at 2012-06-11 14:58
Message generated for change (Tracker Item Submitted) made by
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=536845&aid=3534448&group_id=73133

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: https://www.google.com/accounts ()
Assigned to: Nobody/Anonymous (nobody)
Summary: Unavoidable beeping on enter inside text controls.

Initial Comment:
Press enter inside a textEntry and you'll receive a beep. processEnter, on command, and on anyKey do nothing to resolve the problem. This is on Windows 8 with wxcore and wx 0.13.2.1.

Unable to build on NixOS

Issue reported by Peter Simons. See http://permalink.gmane.org/gmane.comp.lang.haskell.wxhaskell.devel/830

On 17 April 2012 06:15, SourceForge.net [email protected] wrote:

Bugs item #3518787, was opened at 2012-04-17 06:15
Message generated for change (Tracker Item Submitted) made by peti
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=536845&aid=3518787&group_id=73133

[snip]

Submitted By: Peter Simons (peti)
Assigned to: Nobody/Anonymous (nobody)
Summary: wxc build doesn't install libwxc.so

Initial Comment:
When I build and install wxc on Nixos, then the Setup.hs procedure fails to installs the generated libwxc.so DLL into the target directory. A complete build log is attached below that shows the output from running "./Setup configure -v3 && ./Setup build && ./Setup copy -v3".

I have looked at the log, and I think I understand the source of the problem, but not how to fix it, as I know nothing about NixOS beyond a 5 minute browse at the website just now and a good look at the build log. It looks as though it has a very different idea about where code is built and installed than other Unix systems, and we have designed and tested for a more typical scenario. That said - let's see if we can find a work-around.

Because wxc is a shared library, we try to install it in a location where a typical Unix system stands a chance of finding it. We do this with a custom install hook (in Setup.hs), the relevant part of which is below:

-- Copy shared library
let bld_dir = buildDir local_bld_info

    ver = (pkgVersion . package) pkg_descr
    lib = fromJust (library pkg_descr)
    lib_bi = libBuildInfo lib
    custom_bi = customFieldsBI lib_bi
    dll_name = fromJust (lookup "x-dll-name" custom_bi)
    lib_name = sharedLibName ver dll_name

    inst_lib_dir = libdir $ absoluteInstallDirs pkg_descr local_bld_info NoCopyDest

installOrdinaryFile (fromFlag (installVerbosity inst_flags)) (bld_dir </> lib_name) (inst_lib_dir </> lib_name)
ldconfig inst_lib_dir

What this does it to pick up the requested install directory from the package description and build info. In most cases this translates to somewhere under the ~/.cabal directory in the user's home directory. It sounds like this may not really exist in the same form on NixOS.

If I read the Cabal documentation correctly, you may be able to work around this by using the --libdir= option when running Setup.hs configure. In any event, the install directory you want needs to be passed via the configuration if you want to install anywhere out of the ordinary.

Unfortunately, it's not realistic for me to construct a NixOS build environment (I already maintain MacOS X, Windows 7, Ubuntu and FreeBSD, which is plenty, believe me), so I need to rely on you to try things out and see how they work.

MacOSX can't run when using IO

Hi
I'm trying to get wxhaskell to work on macosx 10.9.4, 64bit. I installed wxmac with brew (3.0.1) and I can get a simple GUI to work.

Whenever I try to do some IO (readFile for example), I can't compile with this error:

ld: warning: ignoring file /System/Library/Frameworks//QuickTime.framework/QuickTime, file was built for i386 which is not the architecture being linked (x86_64): /System/Library/Frameworks//QuickTime.framework/QuickTime

I've tried to build wxmac without quicktime but no luck. And as someone pointed out in an earlier issue, there is no Quicktime 64bit version, so I'm not quite sure what to do.
Any ideas how I can work around this issue?

Thanks

Unexpected TextCtrl behaviour

(reported by Heinrich Apfelmus [email protected] - see http://permalink.gmane.org/gmane.comp.lang.haskell.wxhaskell.general/1191)

The more important issue is that TextCtrl widgets have changed their behavior: the entry function will now create a multiline widget!

To create a single-line text entry widgets, I have to use the textCtrlEx function with flag 0 .

This is extremely weird. Also, the latter widget sometimes crashes on me when trying to set the text, but the former doesn't. This is so weird that I can't even tell whether the problem is likely with wxWidgets or with the Haskell bindings.

wxc fails to compile

Using wxgtk-2.9 from the AUR in Arch Linux, which simply installs http://downloads.sourceforge.net/wxwindows/wxWidgets-2.9.3.tar.bz2 as far as I can tell, if I try to install wxc via cabal install wxc, the following output is produced:

~> cabal install wxc
Resolving dependencies...
[1 of 1] Compiling Main             ( /tmp/wxc-0.90.0.3-1286/wxc-0.90.0.3/Setup.hs, /tmp/wxc-0.90.0.3-1286/wxc-0.90.0.3/dist/setup/Main.o )
Linking /tmp/wxc-0.90.0.3-1286/wxc-0.90.0.3/dist/setup/setup ...
Configuring wxc-0.90.0.3...
Configuring wxc to build against wxWidgets 2.9.3.0

Building wxc
/usr/bin/gcc -Wl,--hash-size=31 -Wl,--reduce-memory-overheads -Isrc/include -I/usr/include/wx-2.9 -I/usr/lib/wx/include/gtk2-unicode-2.9 -D__WXGTK__ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -DwxcREFUSE_MEDIACTRL -fPIC -c src/cpp/apppath.cpp -o dist/build/src/cpp/apppath.o
/usr/bin/gcc -Wl,--hash-size=31 -Wl,--reduce-memory-overheads -Isrc/include -I/usr/include/wx-2.9 -I/usr/lib/wx/include/gtk2-unicode-2.9 -D__WXGTK__ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -DwxcREFUSE_MEDIACTRL -fPIC -c src/cpp/dragimage.cpp -o dist/build/src/cpp/dragimage.o
/usr/bin/gcc -Wl,--hash-size=31 -Wl,--reduce-memory-overheads -Isrc/include -I/usr/include/wx-2.9 -I/usr/lib/wx/include/gtk2-unicode-2.9 -D__WXGTK__ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -DwxcREFUSE_MEDIACTRL -fPIC -c src/cpp/eljaccelerator.cpp -o dist/build/src/cpp/eljaccelerator.o
/usr/bin/gcc -Wl,--hash-size=31 -Wl,--reduce-memory-overheads -Isrc/include -I/usr/include/wx-2.9 -I/usr/lib/wx/include/gtk2-unicode-2.9 -D__WXGTK__ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -DwxcREFUSE_MEDIACTRL -fPIC -c src/cpp/eljartprov.cpp -o dist/build/src/cpp/eljartprov.o
/usr/bin/gcc -Wl,--hash-size=31 -Wl,--reduce-memory-overheads -Isrc/include -I/usr/include/wx-2.9 -I/usr/lib/wx/include/gtk2-unicode-2.9 -D__WXGTK__ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -DwxcREFUSE_MEDIACTRL -fPIC -c src/cpp/eljbitmap.cpp -o dist/build/src/cpp/eljbitmap.o
/usr/bin/gcc -Wl,--hash-size=31 -Wl,--reduce-memory-overheads -Isrc/include -I/usr/include/wx-2.9 -I/usr/lib/wx/include/gtk2-unicode-2.9 -D__WXGTK__ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -DwxcREFUSE_MEDIACTRL -fPIC -c src/cpp/eljbrush.cpp -o dist/build/src/cpp/eljbrush.o
/usr/bin/gcc -Wl,--hash-size=31 -Wl,--reduce-memory-overheads -Isrc/include -I/usr/include/wx-2.9 -I/usr/lib/wx/include/gtk2-unicode-2.9 -D__WXGTK__ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -DwxcREFUSE_MEDIACTRL -fPIC -c src/cpp/eljbusyinfo.cpp -o dist/build/src/cpp/eljbusyinfo.o
/usr/bin/gcc -Wl,--hash-size=31 -Wl,--reduce-memory-overheads -Isrc/include -I/usr/include/wx-2.9 -I/usr/lib/wx/include/gtk2-unicode-2.9 -D__WXGTK__ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -DwxcREFUSE_MEDIACTRL -fPIC -c src/cpp/eljbutton.cpp -o dist/build/src/cpp/eljbutton.o
/usr/bin/gcc -Wl,--hash-size=31 -Wl,--reduce-memory-overheads -Isrc/include -I/usr/include/wx-2.9 -I/usr/lib/wx/include/gtk2-unicode-2.9 -D__WXGTK__ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -DwxcREFUSE_MEDIACTRL -fPIC -c src/cpp/eljcalendarctrl.cpp -o dist/build/src/cpp/eljcalendarctrl.o
/usr/bin/gcc -Wl,--hash-size=31 -Wl,--reduce-memory-overheads -Isrc/include -I/usr/include/wx-2.9 -I/usr/lib/wx/include/gtk2-unicode-2.9 -D__WXGTK__ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -DwxcREFUSE_MEDIACTRL -fPIC -c src/cpp/eljcaret.cpp -o dist/build/src/cpp/eljcaret.o
/usr/bin/gcc -Wl,--hash-size=31 -Wl,--reduce-memory-overheads -Isrc/include -I/usr/include/wx-2.9 -I/usr/lib/wx/include/gtk2-unicode-2.9 -D__WXGTK__ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -DwxcREFUSE_MEDIACTRL -fPIC -c src/cpp/eljcheckbox.cpp -o dist/build/src/cpp/eljcheckbox.o
/usr/bin/gcc -Wl,--hash-size=31 -Wl,--reduce-memory-overheads -Isrc/include -I/usr/include/wx-2.9 -I/usr/lib/wx/include/gtk2-unicode-2.9 -D__WXGTK__ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -DwxcREFUSE_MEDIACTRL -fPIC -c src/cpp/eljchecklistbox.cpp -o dist/build/src/cpp/eljchecklistbox.o
/usr/bin/gcc -Wl,--hash-size=31 -Wl,--reduce-memory-overheads -Isrc/include -I/usr/include/wx-2.9 -I/usr/lib/wx/include/gtk2-unicode-2.9 -D__WXGTK__ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -DwxcREFUSE_MEDIACTRL -fPIC -c src/cpp/eljchoice.cpp -o dist/build/src/cpp/eljchoice.o
/usr/bin/gcc -Wl,--hash-size=31 -Wl,--reduce-memory-overheads -Isrc/include -I/usr/include/wx-2.9 -I/usr/lib/wx/include/gtk2-unicode-2.9 -D__WXGTK__ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -DwxcREFUSE_MEDIACTRL -fPIC -c src/cpp/eljclipboard.cpp -o dist/build/src/cpp/eljclipboard.o
/usr/bin/gcc -Wl,--hash-size=31 -Wl,--reduce-memory-overheads -Isrc/include -I/usr/include/wx-2.9 -I/usr/lib/wx/include/gtk2-unicode-2.9 -D__WXGTK__ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -DwxcREFUSE_MEDIACTRL -fPIC -c src/cpp/eljcoldata.cpp -o dist/build/src/cpp/eljcoldata.o
/usr/bin/gcc -Wl,--hash-size=31 -Wl,--reduce-memory-overheads -Isrc/include -I/usr/include/wx-2.9 -I/usr/lib/wx/include/gtk2-unicode-2.9 -D__WXGTK__ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -DwxcREFUSE_MEDIACTRL -fPIC -c src/cpp/eljcolour.cpp -o dist/build/src/cpp/eljcolour.o
/usr/bin/gcc -Wl,--hash-size=31 -Wl,--reduce-memory-overheads -Isrc/include -I/usr/include/wx-2.9 -I/usr/lib/wx/include/gtk2-unicode-2.9 -D__WXGTK__ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -DwxcREFUSE_MEDIACTRL -fPIC -c src/cpp/eljcolourdlg.cpp -o dist/build/src/cpp/eljcolourdlg.o
/usr/bin/gcc -Wl,--hash-size=31 -Wl,--reduce-memory-overheads -Isrc/include -I/usr/include/wx-2.9 -I/usr/lib/wx/include/gtk2-unicode-2.9 -D__WXGTK__ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -DwxcREFUSE_MEDIACTRL -fPIC -c src/cpp/eljcombobox.cpp -o dist/build/src/cpp/eljcombobox.o
/usr/bin/gcc -Wl,--hash-size=31 -Wl,--reduce-memory-overheads -Isrc/include -I/usr/include/wx-2.9 -I/usr/lib/wx/include/gtk2-unicode-2.9 -D__WXGTK__ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -DwxcREFUSE_MEDIACTRL -fPIC -c src/cpp/eljconfigbase.cpp -o dist/build/src/cpp/eljconfigbase.o
/usr/bin/gcc -Wl,--hash-size=31 -Wl,--reduce-memory-overheads -Isrc/include -I/usr/include/wx-2.9 -I/usr/lib/wx/include/gtk2-unicode-2.9 -D__WXGTK__ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -DwxcREFUSE_MEDIACTRL -fPIC -c src/cpp/eljcontrol.cpp -o dist/build/src/cpp/eljcontrol.o
/usr/bin/gcc -Wl,--hash-size=31 -Wl,--reduce-memory-overheads -Isrc/include -I/usr/include/wx-2.9 -I/usr/lib/wx/include/gtk2-unicode-2.9 -D__WXGTK__ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -DwxcREFUSE_MEDIACTRL -fPIC -c src/cpp/eljctxhelp.cpp -o dist/build/src/cpp/eljctxhelp.o
/usr/bin/gcc -Wl,--hash-size=31 -Wl,--reduce-memory-overheads -Isrc/include -I/usr/include/wx-2.9 -I/usr/lib/wx/include/gtk2-unicode-2.9 -D__WXGTK__ -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -DwxcREFUSE_MEDIACTRL -fPIC -c src/cpp/eljcursor.cpp -o dist/build/src/cpp/eljcursor.o
In file included from /usr/include/wx-2.9/wx/memory.h:16:0,
                 from /usr/include/wx-2.9/wx/object.h:20,
                 from /usr/include/wx-2.9/wx/wx.h:16,
                 from src/include/wrapper.h:20,
                 from src/cpp/eljcursor.cpp:1:
/usr/include/wx-2.9/wx/string.h: In function ‘wxCursor* Cursor_CreateFromStock(int)’:
/usr/include/wx-2.9/wx/string.h:478:3: error: ‘wxString::wxString(int)’ is private
src/cpp/eljcursor.cpp:8:26: error: within this context
cabal: Error: some packages failed to install:
wxc-0.90.0.3 failed during the building phase. The exception was:
ExitFailure 1

Loading in ghci fails unless adding libwxc.so path to LD_LIBRARY_PATH

I use wx-0.92.1.0 and wxcore-0.92.1.0. Compilation works perfectly fine (thanks for your hard work), but loading my executable with cabal repl fails with the following error message:

GHCi, version 7.8.4: http://www.haskell.org/ghc/  :? for help
Loading package ghc-prim ... linking ... done.
...
Loading package process-1.2.0.0 ... linking ... done.
Loading package strict-0.3.2 ... linking ... done.
Loading package wxdirect-0.92.1.0 ... linking ... done.
Loading package wxc-0.92.1.1 ... linking ... done.
Loading package wxcore-0.92.1.0 ... <command line>: can't load .so/.DLL for: /home/pschuster/Projects/machina/.cabal-sandbox/lib/x86_64-linux-ghc-7.8.4/wxcore-0.92.1.0/libHSwxcore-0.92.1.0-ghc7.8.4.so (libwxc.so: cannot open shared object file: No such file or directory)

Starting the repl with stack repl and a different version of GHC fails for the same reason:

GHCi, version 7.10.2: http://www.haskell.org/ghc/  :? for help
<command line>: can't load .so/.DLL for: /home/pschuster/Projects/machina/.stack-work/install/x86_64-linux/lts-3.10/7.10.2/lib/x86_64-linux-ghc-7.10.2/wxcore-0.92.1.0-15lAjJPnZ9tLBMMR8v1uFQ/libHSwxcore-0.92.1.0-15lAjJPnZ9tLBMMR8v1uFQ-ghc7.10.2.so (libwxc.so: cannot open shared object file: No such file or directory)

There is a libwxc.so in .cabal-sandbox/lib/x86_64-linux-ghc-7.8.4/wxc-0.92.1.1. If I add the path to LD_LIBRARY_PATH everything works fine:

> export LD_LIBRARY_PATH=:.cabal-sandbox/lib/x86_64-linux-ghc-7.8.4/wxc-0.92.1.1
> cabal repl
...
Ok, modules loaded, ...

None of my attempts of giving the path directly to ghc, gcc or ld via --ghc-option, -optl-Wl, etc. was fruitful.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.