Skip to content

Build problem related to the log library #14

Description

@jonkri

Hi!

I'm trying to compile the latest version but Cabal can't find the log library.

I have installed the android-liblog-dev package.

$ ls /usr/include/android/log
event_tag_map.h  log_event_list.h  log_main.h	     log_radio.h  log_safetynet.h  log_time.h	    logprint.h
log.h		 log_id.h	   log_properties.h  log_read.h   log_system.h	   log_transport.h

This is the output from the build:

$ cabal install android-activity-0.2.0.2
Resolving dependencies...
Build profile: -w ghc-9.6.6 -O1
In order, the following will be built (use -v for more details):
 - data-default-class-0.1.2.2 (lib) (requires download & build)
 - dlist-1.0 (lib) (requires download & build)
 - hsc2hs-0.68.10 (exe:hsc2hs) (requires download & build)
 - old-locale-1.0.0.7 (lib) (requires download & build)
 - data-default-instances-containers-0.1.0.3 (lib) (requires download & build)
 - data-default-instances-dlist-0.0.1.2 (lib) (requires download & build)
 - data-default-instances-old-locale-0.0.1.2 (lib) (requires download & build)
 - data-default-0.7.1.3 (lib) (requires download & build)
 - android-activity-0.2.0.2 (lib) (requires download & build)
Downloading  data-default-class-0.1.2.2
Downloaded   data-default-class-0.1.2.2
Downloading  old-locale-1.0.0.7
Starting     data-default-class-0.1.2.2 (lib)
Downloaded   old-locale-1.0.0.7
Downloading  data-default-instances-old-locale-0.0.1.2
Starting     old-locale-1.0.0.7 (lib)
Downloaded   data-default-instances-old-locale-0.0.1.2
Downloading  dlist-1.0
Downloaded   dlist-1.0
Downloading  data-default-instances-dlist-0.0.1.2
Starting     dlist-1.0 (lib)
Downloaded   data-default-instances-dlist-0.0.1.2
Downloading  data-default-instances-containers-0.1.0.3
Downloaded   data-default-instances-containers-0.1.0.3
Downloading  data-default-0.7.1.3
Building     data-default-class-0.1.2.2 (lib)
Downloaded   data-default-0.7.1.3
Downloading  hsc2hs-0.68.10
Building     old-locale-1.0.0.7 (lib)
Downloaded   hsc2hs-0.68.10
Downloading  android-activity-0.2.0.2
Starting     hsc2hs-0.68.10 (exe:hsc2hs)
Downloaded   android-activity-0.2.0.2
Building     dlist-1.0 (lib)
Installing   data-default-class-0.1.2.2 (lib)
Installing   old-locale-1.0.0.7 (lib)
Completed    data-default-class-0.1.2.2 (lib)
Starting     data-default-instances-containers-0.1.0.3 (lib)
Completed    old-locale-1.0.0.7 (lib)
Starting     data-default-instances-old-locale-0.0.1.2 (lib)
Building     hsc2hs-0.68.10 (exe:hsc2hs)
Building     data-default-instances-containers-0.1.0.3 (lib)
Building     data-default-instances-old-locale-0.0.1.2 (lib)
Installing   dlist-1.0 (lib)
Completed    dlist-1.0 (lib)
Starting     data-default-instances-dlist-0.0.1.2 (lib)
Installing   data-default-instances-containers-0.1.0.3 (lib)
Installing   data-default-instances-old-locale-0.0.1.2 (lib)
Completed    data-default-instances-containers-0.1.0.3 (lib)
Completed    data-default-instances-old-locale-0.0.1.2 (lib)
Building     data-default-instances-dlist-0.0.1.2 (lib)
Installing   data-default-instances-dlist-0.0.1.2 (lib)
Completed    data-default-instances-dlist-0.0.1.2 (lib)
Starting     data-default-0.7.1.3 (lib)
Building     data-default-0.7.1.3 (lib)
Installing   data-default-0.7.1.3 (lib)
Installing   hsc2hs-0.68.10 (exe:hsc2hs)
Completed    hsc2hs-0.68.10 (exe:hsc2hs)
Completed    data-default-0.7.1.3 (lib)
Starting     android-activity-0.2.0.2 (lib)

Failed to build android-activity-0.2.0.2. The failure occurred during the
configure step.
Build log (
/root/.cache/cabal/logs/ghc-9.6.6/android-activity-0.2.0.2-5744d316622ec166f3e6b87bf6d0c0797e5e93f890fc1651fbb96262ec6d31bb.log
):
Configuring library for android-activity-0.2.0.2..
Error: cabal: Missing dependency on a foreign library:
* Missing (or bad) C library: log
This problem can usually be solved by installing the system package that
provides this library (you may need the "-dev" version). If the library is
already installed but in a non-standard location then you can use the flags
--extra-include-dirs= and --extra-lib-dirs= to specify where it is.If the
library file does exist, it may contain errors that are caught by the C
compiler at the preprocessing stage. In this case you can re-run configure
with the verbosity flag -v3 to see the error messages.

Error: cabal: Failed to build android-activity-0.2.0.2. See the build log
above for details.

I also tried to set --extra-include-dirs=/usr/include/android/log and --extra-lib-dirs=/usr/lib/x86_64-linux-gnu/android but that didn't seem to make a difference.

Any hints would be appreciated!

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions