ApexCtl icon indicating copy to clipboard operation
ApexCtl copied to clipboard

Impossible to compile on Manjaro

Open niko-yanev opened this issue 8 years ago • 10 comments

cabal configure Resolving dependencies... Configuring ApexCtl-0.0.2... cabal build Building ApexCtl-0.0.2... Preprocessing executable 'apexctl' for ApexCtl-0.0.2... [1 of 1] Compiling Main ( src/Main.hs, dist/build/apexctl/apexctl-tmp/Main.o ) Linking dist/build/apexctl/apexctl ... /usr/bin/ld: cannot find -lHSvector-0.12.0.1-692PQMDMB6pIQ1uGwefDcQ /usr/bin/ld: cannot find -lHSprimitive-0.6.2.0-4578caNkWQ54Gt1mxLF2Yh /usr/bin/ld: cannot find -lHStext-1.2.2.2-3ENqlljngKa6xj1Go2fVWq /usr/bin/ld: cannot find -lHScmdargs-0.10.17-gTr0lzwrHbBcQQ47pfTGo /usr/bin/ld: cannot find -lHStransformers-0.5.2.0 /usr/bin/ld: cannot find -lHStemplate-haskell-2.11.1.0 /usr/bin/ld: cannot find -lHSpretty-1.1.3.3 /usr/bin/ld: cannot find -lHSghc-boot-th-8.0.2 /usr/bin/ld: cannot find -lHSprocess-1.4.3.0 /usr/bin/ld: cannot find -lHSdirectory-1.3.0.0 /usr/bin/ld: cannot find -lHSunix-2.7.2.1 /usr/bin/ld: cannot find -lHStime-1.6.0.1 /usr/bin/ld: cannot find -lHSfilepath-1.4.1.1 /usr/bin/ld: cannot find -lHSbinary-0.8.3.0 /usr/bin/ld: cannot find -lHScontainers-0.5.7.1 /usr/bin/ld: cannot find -lHSbytestring-0.10.8.1 /usr/bin/ld: cannot find -lHSdeepseq-1.4.2.0 /usr/bin/ld: cannot find -lHSarray-0.5.1.1 /usr/bin/ld: cannot find -lHSbase-4.9.1.0 /usr/bin/ld: cannot find -lHSinteger-gmp-1.0.0.1 /usr/bin/ld: cannot find -lHSghc-prim-0.5.0.0 /usr/bin/ld: cannot find -lHSrts_thr collect2: error: ld returned 1 exit status gcc' failed in phase Linker'. (Exit code: 1) make: *** [makefile:23: dist/build/apexctl/apexctl] Error 1

niko-yanev avatar Jul 18 '17 14:07 niko-yanev

That looks like GHC installation issue. Make sure that you have a working installation of GHC.

tuxmark5 avatar Jul 18 '17 14:07 tuxmark5

I have it 8.0.2. think about manjaro like arch

niko-yanev avatar Jul 18 '17 15:07 niko-yanev

fixed: the line for cabal should say cabal install usb cmdargs primitive text vector and then make && sudo make install. Now i must figure how to bind the L 1-4 keys, as the 4 of these have the same keycode:

L1 l2 l3 l4
"(Scheme function)"
    m:0x10 + c:248
    Mod2 + NoSymbol

niko-yanev avatar Jul 18 '17 17:07 niko-yanev

Also forgot to mention that MX keys acts like media buttons and M1...M4 and M9..M12 are not working at all. Is there a way to make them work, or assign some codes to these? Thanks a lot

niko-yanev avatar Jul 19 '17 07:07 niko-yanev

There was a firmware upgrade recently, maybe they mess some stuff. Is there a way to make L keys to work? Thanks

niko-yanev avatar Jul 20 '17 03:07 niko-yanev

Hello there.

I got the same problem (exactly the same output as the OP) and I'm currently on Antergos (Arch Linux) and also have ghc 8.0.2. How did you fix the build @gericom-hummer ? I tried cabal install usb cmdargs primitive text vector but the package were already installed on my side.

Thanks :)

thiphariel avatar Aug 03 '17 13:08 thiphariel

@gericom-hummer I'm not using an Apex keyboard anymore, so I can't test the utility well. However, in order to make different keys work, you need to properly install the 90-apex.hwdb file, which assigns unique keycodes to each hardware key. Then these keycodes are translated into X11 keycodes, which can be bound to actions via xbindkeys or a similar utility.

tuxmark5 avatar Aug 03 '17 13:08 tuxmark5

Try to override with force install option

-- Nikola Yanev

http://www.gericom.free.bg http://www.gericom.wordpress.com Linux, Android, Mac OS X & Windows installing Open Source Software support and translations Part of Manjaro Bulgarian Translators Team Part of Ubuntu Bulgarian Translators Team PC/Laptops cleaning, PC Hardware/Software reparation/renovation, Trainings, Graphical adds, Computer Engineering.

---This mail was sent from Manjaro by KMail---

This email and any attached files ("Message") may contain confidential and/or privileged information. It is intended solely for the addressee(s). If you receive this Message in error, inform the sender by reply email, delete the Message and destroy any printed copy. Any unauthorized use, distribution, or copying of this Message or any part thereof is prohibited. Emails are susceptible to alteration. Neither Me - Nikola Yanev, nor any of its affiliates shall be liable for the Message if altered or falsified nor shall they be liable for any damage caused by any virus that might be transmitted with this Message.

On Aug 3, 2017 16:36, "Audrius" [email protected] wrote:

@gericom-hummer https://github.com/gericom-hummer I'm not using an Apex keyboard anymore, so I can't test the utility well. However, in order to make different keys work, you need to properly install the 90-apex.hwdb file, which assigns unique keycodes to each hardware key. Then these keycodes are translated into X11 keycodes, which can be bound to actions via xbindkeys or a similar utility.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/tuxmark5/ApexCtl/issues/50#issuecomment-319970773, or mute the thread https://github.com/notifications/unsubscribe-auth/AK2QlMf4bJA-fu0WewLfurLzEw-TID1bks5sUczmgaJpZM4ObcpS .

niko-yanev avatar Aug 03 '17 13:08 niko-yanev

Arch user, I made a clean chroot, wherein only base, base-devel, ghc, libusb, cabal-install, git, and pkg-config were installed, cloned ApexCtl, ran

cabal update cabal install usb cmdargs

with the following output:

[root@AstroBox ApexCtl]# cabal update Config file path source is default config file. Config file /root/.cabal/config not found. Writing default configuration to /root/.cabal/config Downloading the latest package list from hackage.haskell.org [root@AstroBox ApexCtl]# cabal install usb cmdargs Resolving dependencies... Downloading bindings-DSL-1.0.23... Downloading cmdargs-0.10.17... Downloading primitive-0.6.2.0... Configuring cmdargs-0.10.17... Configuring bindings-DSL-1.0.23... Building cmdargs-0.10.17... Building bindings-DSL-1.0.23... Installed bindings-DSL-1.0.23 Downloading bindings-libusb-1.4.5.0... Configuring primitive-0.6.2.0... Building primitive-0.6.2.0... Installed primitive-0.6.2.0 Downloading vector-0.12.0.1... Configuring bindings-libusb-1.4.5.0... Building bindings-libusb-1.4.5.0... Installed cmdargs-0.10.17 Configuring vector-0.12.0.1... Building vector-0.12.0.1... Installed bindings-libusb-1.4.5.0 Installed vector-0.12.0.1 Downloading usb-1.3.0.5... Configuring usb-1.3.0.5... Building usb-1.3.0.5... Installed usb-1.3.0.5

and then make, which failed, with the following output:

[root@AstroBox ApexCtl]# make cabal configure Resolving dependencies... Configuring ApexCtl-0.0.2... cabal build Building ApexCtl-0.0.2... Preprocessing executable 'apexctl' for ApexCtl-0.0.2... [1 of 1] Compiling Main ( src/Main.hs, dist/build/apexctl/apexctl-tmp/Main.o ) Linking dist/build/apexctl/apexctl ... /usr/bin/ld: cannot find -lHStext-1.2.2.2-3ENqlljngKa6xj1Go2fVWq /usr/bin/ld: cannot find -lHStransformers-0.5.2.0 /usr/bin/ld: cannot find -lHStemplate-haskell-2.11.1.0 /usr/bin/ld: cannot find -lHSpretty-1.1.3.3 /usr/bin/ld: cannot find -lHSghc-boot-th-8.0.2 /usr/bin/ld: cannot find -lHSprocess-1.4.3.0 /usr/bin/ld: cannot find -lHSdirectory-1.3.0.0 /usr/bin/ld: cannot find -lHSunix-2.7.2.1 /usr/bin/ld: cannot find -lHStime-1.6.0.1 /usr/bin/ld: cannot find -lHSfilepath-1.4.1.1 /usr/bin/ld: cannot find -lHSbinary-0.8.3.0 /usr/bin/ld: cannot find -lHScontainers-0.5.7.1 /usr/bin/ld: cannot find -lHSbytestring-0.10.8.1 /usr/bin/ld: cannot find -lHSdeepseq-1.4.2.0 /usr/bin/ld: cannot find -lHSarray-0.5.1.1 /usr/bin/ld: cannot find -lHSbase-4.9.1.0 /usr/bin/ld: cannot find -lHSinteger-gmp-1.0.0.1 /usr/bin/ld: cannot find -lHSghc-prim-0.5.0.0 /usr/bin/ld: cannot find -lHSrts_thr collect2: error: ld returned 1 exit status `gcc' failed in phase `Linker'. (Exit code: 1) make: *** [makefile:23: dist/build/apexctl/apexctl] Error 1

AstroSnail avatar Aug 04 '17 19:08 AstroSnail

This may not be the most incredibly helpful comment in the world as I'm not entirely familiar with Haskell but would it perhaps be possible to compile Main.hs using ghc -dynamic Main.hs per The Arch Wiki and manually copy the configs to their required directories?

Edit: Curse my love of skimming. Again, per the link above:

This also causes issues with Cabal trying to use the default static linking. To force dynamic linking in Cabal, edit ~/.cabal/config and add the line executable-dynamic: True.

This fixed the issue for me, running Arch.

Paging @AstroSnail @thiphariel

SnailShea avatar Sep 05 '17 04:09 SnailShea