[cmake-developers] Static Bootstrap: CCMake & GPM

Huebl, Axel a.huebl at hzdr.de
Mon Dec 7 19:52:16 EST 2015


Hi,

I did build a static version of CMake today successfully via

LDFLAGS="-static-libstdc++ -static-libgcc -static" \
  CFLAGS="-fPIC" \
  CXXFLAGS="-fPIC" \
  ./bootstrap

make -j
make install

(the -fPIC could also be superfluous, I just realized later that I need
to build my gcc via -fPIC, too.)

My problem: I found that in the last step of linking ccmake against a
static (pre-compiled, ubuntu 12.04) ncurses library leads to linker
errors such as:

/usr/lib/x86_64-linux-gnu/libncurses.a(lib_mouse.o): In function
`_nc_mouse_event':
(.text+0x61e): undefined reference to `Gpm_GetEvent'
/usr/lib/x86_64-linux-gnu/libncurses.a(lib_mouse.o): In function
`enable_gpm_mouse':
(.text+0x78c): undefined reference to `Gpm_Close'
/usr/lib/x86_64-linux-gnu/libncurses.a(lib_mouse.o): In function
`enable_gpm_mouse':
(.text+0x7ce): undefined reference to `Gpm_Open'
/usr/lib/x86_64-linux-gnu/libncurses.a(lib_mouse.o): In function
`enable_gpm_mouse':
(.text+0x7df): undefined reference to `Gpm_Close'
/usr/lib/x86_64-linux-gnu/libncurses.a(lib_mouse.o): In function
`initialize_mousetype':
(.text+0x935): undefined reference to `gpm_fd'
/usr/lib/x86_64-linux-gnu/libncurses.a(lib_mouse.o): In function
`mouse_activate':
(.text+0xb67): undefined reference to `gpm_fd'


I then used the make VERBOSE=1 output to simply add the static libgmp.a
via -lgpm in the end of the line to finish the install.

Is it possible that the GPM dependency is missing in the ccmake install
scripts? I tried to find the lines in

https://github.com/Kitware/CMake/blob/master/Source/CursesDialog/CMakeLists.txt

but could not find a place to add it.


Cheers,
Axel
-- 

Axel Huebl
Phone +49 351 260 3582
https://www.hzdr.de/crp
Computational Radiation Physics
Laser Particle Acceleration Division
Helmholtz-Zentrum Dresden - Rossendorf e.V.

Bautzner Landstrasse 400, 01328 Dresden
POB 510119, D-01314 Dresden
Vorstand: Prof. Dr.Dr.h.c. R. Sauerbrey
          Prof. Dr.Dr.h.c. P. Joehnk
VR 1693 beim Amtsgericht Dresden

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5119 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20151208/d7bc767a/attachment.bin>


More information about the cmake-developers mailing list