[GHC] #15688: HAVE_LIBNUMA is defined as non-zero even when libnuma does not exist

GHC ghc-devs at haskell.org
Sat Sep 29 09:59:05 UTC 2018


#15688: HAVE_LIBNUMA is defined as non-zero even when libnuma does not exist
----------------------------------------+---------------------------------
           Reporter:  osa1              |             Owner:  (none)
               Type:  bug               |            Status:  new
           Priority:  normal            |         Milestone:
          Component:  Build System      |           Version:  8.6.1
           Keywords:                    |  Operating System:  Linux
       Architecture:  Unknown/Multiple  |   Type of failure:  None/Unknown
          Test Case:                    |        Blocked By:
           Blocking:                    |   Related Tickets:
Differential Rev(s):                    |         Wiki Page:
----------------------------------------+---------------------------------
 I think this is a regression introduced in the last few weeks.

 The libnuma dependency is checked correctly by the configure script, but
 somehow when I don't have libnuma installed I still have `HAVE_LIBNUMA`
 defined as non-zero so I end up with this error:

 {{{
 /usr/bin/x86_64-linux-gnu-ld.gold: error: cannot find -lnuma

 rts/posix/OSMem.c:368:0: error:
      error: undefined reference to 'mbind'
     |
 368 |     if (RtsFlags.GcFlags.numa) {
     | ^

 rts/posix/OSMem.c:670:0: error:
      error: undefined reference to 'numa_num_configured_nodes'
     |
 670 | }
     | ^

 rts/posix/OSMem.c:680:0: error:
      error: undefined reference to 'numa_get_mems_allowed'
     |
 680 |
     | ^

 rts/posix/OSMem.c:670:0: error:
      error: undefined reference to 'numa_num_configured_nodes'
     |
 670 | }
     | ^

 rts/posix/OSMem.c:685:0: error:
      error: undefined reference to 'numa_bitmask_free'
     |
 685 |     mask = numa_get_mems_allowed();
     | ^

 rts/posix/OSMem.c:670:0: error:
      error: undefined reference to 'numa_num_configured_nodes'
     |
 670 | }
     | ^
 collect2: error: ld returned 1 exit status
 `gcc' failed in phase `Linker'. (Exit code: 1)
 utils/ghc-cabal/ghc.mk:56: recipe for target 'utils/ghc-
 cabal/dist/build/tmp/ghc-cabal' failed
 }}}

 Installing libnuma-dev fixes this.

 Relevant lines in config.log:

 {{{
 CabalHaveLibNuma='False'
 #define HAVE_LIBNUMA 0
 }}}

 I have no idea why `HAVE_LIBNUMA` is not 0 when compiling the file.

-- 
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15688>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list