Getting compilation error for libcurl - c

I am trying to compile libcurl with Openssl & SSH2 (manually built). Here is my configure command:
./configure --with-ssl=/home/yuvi/development/openssl --with-libssh2=/home/yuvi/development/ssh --enable-debug --prefix=/home/yuvi/development/curl CPPFLAGS="-I/home/yuvi/development/openssl/include -I/home/yuvi/development/ssh/include" LDFLAGS="-L/home/yuvi/development/openssl/lib -L/home/yuvi/development/ssh/lib" PKG_CONFIG_PATH=/home/yuvi/development/openssl/lib/pkgconfig:/home/yuvi/development/ssh/lib/pkgconfig LIBS="-lssl -lssh2 -lcrypto"
And following error I am getting while libtool phase :
libtool: link: gcc -shared -fPIC -DPIC .libs/file.o .libs/timeval.o .libs/base64.o .libs/hostip.o .libs/progress.o .libs/formdata.o .libs/cookie.o .libs/http.o .libs/sendf.o .libs/ftp.o .libs/url.o .libs/dict.o .libs/if2ip.o .libs/speedcheck.o .libs/ldap.o .libs/ssluse.o .libs/version.o .libs/getenv.o .libs/escape.o .libs/mprintf.o .libs/telnet.o .libs/netrc.o .libs/getinfo.o .libs/transfer.o .libs/strequal.o .libs/easy.o .libs/security.o .libs/krb4.o .libs/curl_fnmatch.o .libs/fileinfo.o .libs/ftplistparser.o .libs/wildcard.o .libs/krb5.o .libs/memdebug.o .libs/http_chunks.o .libs/strtok.o .libs/connect.o .libs/llist.o .libs/hash.o .libs/multi.o .libs/content_encoding.o .libs/share.o .libs/http_digest.o .libs/md4.o .libs/md5.o .libs/curl_rand.o .libs/http_negotiate.o .libs/inet_pton.o .libs/strtoofft.o .libs/strerror.o .libs/hostasyn.o .libs/hostip4.o .libs/hostip6.o .libs/hostsyn.o .libs/inet_ntop.o .libs/parsedate.o .libs/select.o .libs/gtls.o .libs/sslgen.o .libs/tftp.o .libs/splay.o .libs/strdup.o .libs/socks.o .libs/ssh.o .libs/nss.o .libs/qssl.o .libs/rawstr.o .libs/curl_addrinfo.o .libs/socks_gssapi.o .libs/socks_sspi.o .libs/curl_sspi.o .libs/slist.o .libs/nonblock.o .libs/curl_memrchr.o .libs/imap.o .libs/pop3.o .libs/smtp.o .libs/pingpong.o .libs/rtsp.o .libs/curl_threads.o .libs/warnless.o .libs/hmac.o .libs/polarssl.o .libs/curl_rtmp.o .libs/openldap.o .libs/curl_gethostname.o .libs/gopher.o .libs/axtls.o .libs/idn_win32.o .libs/http_negotiate_sspi.o .libs/cyassl.o .libs/http_proxy.o .libs/non-ascii.o .libs/asyn-ares.o .libs/asyn-thread.o .libs/curl_gssapi.o .libs/curl_ntlm.o .libs/curl_ntlm_wb.o .libs/curl_ntlm_core.o .libs/curl_ntlm_msgs.o -Wl,-rpath -Wl,/home/yuvi/development/ssh/lib -Wl,-rpath -Wl,/home/yuvi/development/ssh/lib -L/home/yuvi/development/openssl/lib -L/home/yuvi/development/ssh/lib -lrt -lz -lssl /home/yuvi/development/ssh/lib/libssh2.so -lcrypto -O0 -Wl,-soname -Wl,libcurl.so.4 -o .libs/libcurl.so.4.2.0
/usr/bin/ld: /home/yuvi/development/openssl/lib/libssl.a(s2_clnt.o): relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC
/home/yuvi/development/openssl/lib/libssl.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make[2]: *** [libcurl.la] Error 1
make[2]: Leaving directory `/home/yuvi/development/curl-7.24.0/lib'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/yuvi/development/curl-7.24.0/lib'
make: *** [all-recursive] Error 1
Could anyone please help me out? What am I missing?

You need to recompile your /home/yuvi/development/openssl/lib/libssl.a with -fPIC

Related

OpenVAS libgvm_util.so: undefined reference to `MQTTClient_`

Have some troubles in compiling from source https://github.com/greenbone/openvas.git
cmake was done successfully, but make failed with:
/usr/bin/ld: /opt/gvm/lib/libgvm_util.so: undefined reference to `MQTTClient_connect5'
/usr/bin/ld: /opt/gvm/lib/libgvm_util.so: undefined reference to `MQTTClient_publishMessage5'
/usr/bin/ld: /opt/gvm/lib/libgvm_util.so: undefined reference to `MQTTClient_freeMessage'
/usr/bin/ld: /opt/gvm/lib/libgvm_util.so: undefined reference to `MQTTClient_free'
/usr/bin/ld: /opt/gvm/lib/libgvm_util.so: undefined reference to `MQTTClient_createWithOptions'
/usr/bin/ld: /opt/gvm/lib/libgvm_util.so: undefined reference to `MQTTClient_waitForCompletion'
/usr/bin/ld: /opt/gvm/lib/libgvm_util.so: undefined reference to `MQTTProperties_free'
/usr/bin/ld: /opt/gvm/lib/libgvm_util.so: undefined reference to `MQTTClient_receive'
/usr/bin/ld: /opt/gvm/lib/libgvm_util.so: undefined reference to `MQTTClient_disconnect5'
/usr/bin/ld: /opt/gvm/lib/libgvm_util.so: undefined reference to `MQTTClient_subscribe5'
/usr/bin/ld: /opt/gvm/lib/libgvm_util.so: undefined reference to `MQTTClient_strerror'
/usr/bin/ld: /opt/gvm/lib/libgvm_util.so: undefined reference to `MQTTClient_destroy'
/usr/bin/ld: /opt/gvm/lib/libgvm_util.so: undefined reference to `MQTTClient_unsubscribe'
/usr/bin/ld: /opt/gvm/lib/libgvm_util.so: undefined reference to `MQTTResponse_free'
collect2: error: ld returned 1 exit status
make[2]: *** [nasl/CMakeFiles/openvas-nasl-lint.dir/build.make:86: nasl/openvas-nasl-lint] Error 1
make[1]: *** [CMakeFiles/Makefile2:284: nasl/CMakeFiles/openvas-nasl-lint.dir/all] Error 2
make: *** [Makefile:163: all] Error 2
Have installed from source Paho_MQTT_C_Client and have in /usr/local/lib/ all the libpaho-mqtt3 libs:
libpaho-mqtt3a.so libpaho-mqtt3as.so.1 libpaho-mqtt3c.so.1.3 python3.8
libpaho-mqtt3a.so.1 libpaho-mqtt3as.so.1.3 libpaho-mqtt3cs.so
libpaho-mqtt3a.so.1.3 libpaho-mqtt3c.so libpaho-mqtt3cs.so.1
libpaho-mqtt3as.so libpaho-mqtt3c.so.1 libpaho-mqtt3cs.so.1.3
nm libpaho-mqtt3c.so:
0000000000016b9d T MQTTClient_connect5
000000000001828c T MQTTClient_publishMessage5
00000000000152f4 T MQTTClient_freeMessage
000000000001536a T MQTTClient_free
00000000000187eb T MQTTClient_createWithOptions
0000000000018465 T MQTTClient_waitForCompletion
000000000001301b T MQTTProperties_free
00000000000171f9 T MQTTClient_receive
0000000000016c60 T MQTTClient_disconnect5
0000000000017cd5 T MQTTClient_subscribe5
0000000000018be9 T MQTTClient_strerror
00000000000150dc T MQTTClient_destroy
000000000001783f T MQTTClient_unsubscribe
00000000000153b7 T MQTTResponse_free
Here the CMakeLists:
cmake_minimum_required (VERSION 3.0)
message ("-- Configuring the Scanner...")
# VERSION: Always include major, minor and patch level.
project (openvas
VERSION 21.10.0
LANGUAGES C)
if (POLICY CMP0005)
cmake_policy (SET CMP0005 NEW)
endif (POLICY CMP0005)
SET(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
if (NOT CMAKE_BUILD_TYPE)
set (CMAKE_BUILD_TYPE Debug)
endif (NOT CMAKE_BUILD_TYPE)
OPTION (ENABLE_COVERAGE "Enable support for coverage analysis" OFF)
## Retrieve git revision (at configure time)
include (GetGit)
if (NOT CMAKE_BUILD_TYPE MATCHES "Release")
if (EXISTS "${CMAKE_SOURCE_DIR}/.git/")
if (GIT_FOUND)
Git_GET_REVISION(${CMAKE_SOURCE_DIR} ProjectRevision)
set (GIT_REVISION "~git-${ProjectRevision}")
endif (GIT_FOUND)
endif (EXISTS "${CMAKE_SOURCE_DIR}/.git/")
endif (NOT CMAKE_BUILD_TYPE MATCHES "Release")
## make format
message (STATUS "Looking for clang-format...")
find_program (CLANG_FORMAT clang-format)
if (CLANG_FORMAT)
message (STATUS "Looking for clang-format... ${CLANG_FORMAT}")
add_custom_target(format COMMAND ${CLANG_FORMAT} "-i" "./src/*.c" "./misc/*.c"
"./nasl/*.c" "./src/*.h" "./misc/*.h" "./nasl/*.h"
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}")
else (CLANG_FORMAT)
message (STATUS "clang-format not found...")
endif (CLANG_FORMAT)
# Set dev version if this is a development version and not a full release,
# unset (put value 0 or delete line) before a full release and reset after.
set (PROJECT_DEV_VERSION 1)
# If PROJECT_DEV_VERSION is set, the version string will be set to:
# "major.minor.patch~dev${PROJECT_DEV_VERSION}${GIT_REVISION}"
# If PROJECT_DEV_VERSION is NOT set, the version string will be set to:
# "major.minor.patch${GIT_REVISION}"
# For CMAKE_BUILD_TYPE "Release" the git revision will be empty.
if (PROJECT_DEV_VERSION)
set (PROJECT_VERSION_SUFFIX "~dev${PROJECT_DEV_VERSION}")
endif (PROJECT_DEV_VERSION)
set (PROJECT_VERSION_STRING "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}${PROJECT_VERSION_SUFFIX}${GIT_REVISION}")
## CPack configuration
set (CPACK_CMAKE_GENERATOR "Unix Makefiles")
set (CPACK_GENERATOR "TGZ")
set (CPACK_INSTALL_CMAKE_PROJECTS ".;openvas;ALL;/")
set (CPACK_MODULE_PATH "")
set (CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/COPYING")
set (CPACK_RESOURCE_FILE_README "${CMAKE_SOURCE_DIR}/README.md")
set (CPACK_RESOURCE_FILE_WELCOME "${CMAKE_SOURCE_DIR}/README.md")
set (CPACK_SOURCE_GENERATOR "TGZ")
set (CPACK_SOURCE_TOPLEVEL_TAG "")
set (CPACK_SYSTEM_NAME "")
set (CPACK_TOPLEVEL_TAG "")
set (CPACK_PACKAGE_VERSION "${PROJECT_VERSION_STRING}${PROJECT_VERSION_GIT}")
set (CPACK_PACKAGE_FILE_NAME "${PROJECT_NAME}-${CPACK_PACKAGE_VERSION}")
set (CPACK_SOURCE_PACKAGE_FILE_NAME "${PROJECT_NAME}-${CPACK_PACKAGE_VERSION}")
set (CPACK_PACKAGE_VENDOR "The OpenVAS Project")
set (CPACK_SOURCE_IGNORE_FILES
"${CMAKE_BINARY_DIR}"
"/.git/"
"swp$"
"nasl/nasl_grammar.tab.c"
"nasl/nasl_grammar.tab.h"
"nasl/nasl_grammar.output"
)
include (CPack)
## Variables
if (SYSCONF_INSTALL_DIR)
set (SYSCONFDIR "${SYSCONF_INSTALL_DIR}")
endif (SYSCONF_INSTALL_DIR)
if (NOT SYSCONFDIR)
set (SYSCONFDIR "/etc")
endif (NOT SYSCONFDIR)
if (NOT EXEC_PREFIX)
set (EXEC_PREFIX "${CMAKE_INSTALL_PREFIX}")
endif (NOT EXEC_PREFIX)
if (NOT BINDIR)
set (BINDIR "${EXEC_PREFIX}/bin")
endif (NOT BINDIR)
if (NOT SBINDIR)
set (SBINDIR "${EXEC_PREFIX}/sbin")
endif (NOT SBINDIR)
if (NOT LIBDIR)
set (_DEFAULT_LIBRARY_INSTALL_DIR lib)
if (EXISTS "${EXEC_PREFIX}/lib32/" AND CMAKE_SIZEOF_VOID_P EQUAL 4)
set (_DEFAULT_LIBRARY_INSTALL_DIR lib32)
endif (EXISTS "${EXEC_PREFIX}/lib32/" AND CMAKE_SIZEOF_VOID_P EQUAL 4)
if (EXISTS "${CMAKE_INSTALL_PREFIX}/lib64/" AND CMAKE_SIZEOF_VOID_P EQUAL 8)
set (_DEFAULT_LIBRARY_INSTALL_DIR lib64)
endif (EXISTS "${CMAKE_INSTALL_PREFIX}/lib64/" AND CMAKE_SIZEOF_VOID_P EQUAL 8)
set( LIBRARY_INSTALL_DIR "${_DEFAULT_LIBRARY_INSTALL_DIR}")
set (LIBDIR "${EXEC_PREFIX}/${LIBRARY_INSTALL_DIR}")
message ("Set LIBDIR to ${LIBDIR}")
endif (NOT LIBDIR)
if (NOT LOCALSTATEDIR)
set (LOCALSTATEDIR "/var")
endif (NOT LOCALSTATEDIR)
if (NOT DATADIR)
set (DATADIR "${CMAKE_INSTALL_PREFIX}/share")
endif (NOT DATADIR)
if (NOT OPENVAS_RUN_DIR)
set (OPENVAS_RUN_DIR "/run/ospd")
endif (NOT OPENVAS_RUN_DIR)
set (OPENVAS_DATA_DIR "${DATADIR}/openvas")
set (OPENVAS_STATE_DIR "${LOCALSTATEDIR}/lib/openvas")
if (NOT OPENVAS_FEED_LOCK_PATH)
set (OPENVAS_FEED_LOCK_PATH "${OPENVAS_STATE_DIR}/feed-update.lock")
endif (NOT OPENVAS_FEED_LOCK_PATH)
add_definitions (-DOPENVAS_FEED_LOCK_PATH="${OPENVAS_FEED_LOCK_PATH}")
if (NOT GVM_LOG_DIR)
set (GVM_LOG_DIR "${LOCALSTATEDIR}/log/gvm")
endif (NOT GVM_LOG_DIR)
set (OPENVAS_SYSCONF_DIR "${SYSCONFDIR}/openvas")
set (GVM_SYSCONF_DIR "${SYSCONFDIR}/gvm")
if (NOT OPENVAS_NVT_DIR)
set (OPENVAS_NVT_DIR "${OPENVAS_STATE_DIR}/plugins")
endif (NOT OPENVAS_NVT_DIR)
if (NOT GVM_ACCESS_KEY_DIR)
set (GVM_ACCESS_KEY_DIR "${GVM_SYSCONF_DIR}")
endif (NOT GVM_ACCESS_KEY_DIR)
if (NOT OPENVAS_GPG_BASE_DIR)
set (OPENVAS_GPG_BASE_DIR "${OPENVAS_SYSCONF_DIR}")
endif (NOT OPENVAS_GPG_BASE_DIR)
set (OPENVAS_LIB_INSTALL_DIR "${LIBDIR}")
set (OPENVAS_CONF "${OPENVAS_SYSCONF_DIR}/openvas.conf")
set (NVT_TIMEOUT "320")
set (SCANNER_NVT_TIMEOUT "36000")
message ("-- Install prefix: ${CMAKE_INSTALL_PREFIX}")
## Version
set (OPENVAS_VERSION "${PROJECT_VERSION_STRING}")
# Configure Doxyfile with version number
configure_file (doc/Doxyfile.in doc/Doxyfile #ONLY)
configure_file (doc/Doxyfile_full.in doc/Doxyfile_full #ONLY)
configure_file (doc/Doxyfile_xml.in doc/Doxyfile_xml #ONLY)
configure_file (doc/openvas.8.in doc/openvas.8 #ONLY)
configure_file (VERSION.in VERSION #ONLY)
configure_file (tools/greenbone-nvt-sync.in tools/greenbone-nvt-sync #ONLY)
configure_file (src/openvas_log_conf.cmake_in src/openvas_log.conf)
## Testing
enable_testing ()
add_custom_target (tests
DEPENDS attack-test pcap-test)
## Program
if (ENABLE_COVERAGE)
set (COVERAGE_FLAGS "--coverage")
endif (ENABLE_COVERAGE)
set (HARDENING_FLAGS "-Wformat -Wformat-security -D_FORTIFY_SOURCE=2 -fstack-protector")
set (LINKER_HARDENING_FLAGS "-Wl,-z,relro -Wl,-z,now")
# The "-D_FILE_OFFSET_BITS=64 -DLARGEFILE_SOURCE=1" is necessary for GPGME!
set (GPGME_C_FLAGS "-D_FILE_OFFSET_BITS=64 -DLARGEFILE_SOURCE=1")
set (CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} ${HARDENING_FLAGS}")
set (CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} ${COVERAGE_FLAGS}")
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${GPGME_C_FLAGS} -Wall -D_BSD_SOURCE -D_ISOC99_SOURCE -D_SVID_SOURCE -D_DEFAULT_SOURCE")
if (NOT SKIP_SRC)
add_subdirectory (misc)
add_subdirectory (nasl)
add_subdirectory (src)
endif (NOT SKIP_SRC)
## Documentation
add_subdirectory (doc)
## Tests
enable_testing ()
## End
Any clue how to sort it out?
You need to build gvm-libs from main branch too with libpaho support. But building from main branch is strongly unrecommended. Main branches are development branches an can break every time. Please use the stable branches instead.

undefined reference to symbol 'xt_finalize' / error adding symbols: DSO missing from command line

I'm lost. This is the compile line (a huge one):
mpif90 -autodouble -I./ -I../src -I../modules -I../../messy/bmil -I../../messy/echam5/bmil -I../../messy/echam5/smil -I../../messy/smil -I../../messy/smcl -I../../mpiom/src -I../../mpiom/src_hamocc -I/gpfs/software/juwels/stages/2018a/software/netCDF-Fortran/4.4.4-ipsmpi-2018a/include -I/gpfs/software/juwels/stages/2018a/software/netCDF-Fortran/4.4.4-ipsmpi-2018a/include -I/gpfs/software/juwels/stages/2018a/software/YAXT/0.6.0-ipsmpi-2018a/include -I../include -g -traceback -debug all -check all -fpp -O0 -fp-model precise -fp-speculation=safe -fno-alias -no-ansi-alias -lpthread -save-temps -DMESSY -DLITTLE_ENDIAN -D_LINUX64 -DPNCREGRID -DMESSYTIMER -DMESSYGRID -DECHAM5 -DE5302 -DHAVE_LIBNETCDF64 -DFFT991 -DALBMELTHI -DMPIOM_13B -DHAVE_YAXT -DMECCA_TAG -c ../src/tf2.f90
mpif90 -Wl,-rpath,/gpfs/software/juwels/stages/2018a/software/YAXT/0.6.0-ipsmpi-2018a/lib -o ../../bin/echam5.exe auxhyb.o clsst.o clveg.o conteq.o control.o dyn.o ewd.o fftd.o ffti.o geopot.o gpc.o hdiff.o helmo.o inhysi.o inictl.o inidoc.o init_decomposition.o initemp.o initialize.o ioinitial.o iorestart.o labrun.o legtri.o ltd.o lti.o m_alloc_mods.o master.o maxwind.o messy_a2o_e5.o messy_aeropt_si.o messy_airsea_si.o messy_airtraf_e5.o messy_bioburn_si.o messy_bufly_e5.o messy_cam_aerocld_e5.o messy_cam_drydepo_e5.o messy_cam_e5.o messy_cam_sfflux_e5.o messy_ch4_si.o messy_chemglue_si.o messy_clams_si.o messy_clamsbmix_si.o messy_clamscirrus_si.o messy_clamsmix_si.o messy_clamsrdfrc_si.o messy_clamssedi_si.o messy_clamstraj_si.o messy_cloud_si.o messy_cloudj_si.o messy_cloudopt_si.o messy_contrail_si.o messy_convect_si.o messy_cvtrans_si.o messy_d14co_e5.o messy_ddep_si.o messy_dissoc_si.o messy_diumod_si.o messy_dradon_si.o messy_e4chem_si.o messy_e5vdiff_si.o messy_ec2cosmo_e5.o messy_gec_si.o messy_gmxe_si.o messy_gwave_si.o messy_h2o_e5.o messy_h2oiso_e5.o messy_hamocc_e5.o messy_hd_e5.o messy_jval_si.o messy_jvst_si.o messy_lnox_si.o messy_m7_si.o messy_made3_si.o messy_made_si.o messy_main_blather_bi.o messy_main_bmluse_bi.o messy_main_channel_bi.o messy_main_control_bi.o messy_main_data_bi.o messy_main_decomp_bi.o messy_main_grid_bi.o messy_main_grid_netcdf_bi.o messy_main_import_bi.o messy_main_import_grid_bi.o messy_main_import_grid_tools_bi.o messy_main_import_lt_bi.o messy_main_import_rgt_bi.o messy_main_import_ts_bi.o messy_main_mpi_bi.o messy_main_qtimer_bi.o messy_main_rnd_bi.o messy_main_switch_bi.o messy_main_tendency_bi.o messy_main_timer_bi.o messy_main_tools_bi.o messy_main_tracer_bi.o messy_main_tracer_family_bi.o messy_main_tracer_mem_bi.o messy_main_tracer_pdef_bi.o messy_main_transform_bi.o messy_mecca_aero_si.o messy_mecca_khet_si.o messy_mecca_mem_si.o messy_mecca_poly_si.o messy_mecca_si.o messy_mecca_tag_fcm_si.o messy_mecca_tag_si.o messy_megan_si.o messy_mlocean_e5.o messy_mmd2way_child_si.o messy_mmd2way_parent_si.o messy_mmd2way_si.o messy_mmforce_e5.o messy_mpiom_e5.o messy_mpiom_mem_e5.o messy_mpiom_tools_e5.o messy_msbm_si.o messy_mtskip_si.o messy_ncregrid_interface.o messy_ncregrid_tools_bi.o messy_o3orig_si.o messy_offemis_si.o messy_onemis_si.o messy_oracle_si.o messy_orbit_si.o messy_orogw_si.o messy_otphysc_e5.o messy_plumegas_si.o messy_ptrac_si.o messy_ptracini_si.o messy_qbo_si.o messy_rad_fubrad_si.o messy_rad_si.o messy_relax_e5.o messy_s4d_si.o messy_satsims_e5.o messy_scalc_si.o messy_scav_si.o messy_scout_si.o messy_sedi_si.o messy_sorbit_si.o messy_spacenox_e5.o messy_spe_e5.o messy_surface_si.o messy_tagging_si.o messy_tbudget_si.o messy_timepos_e5.o messy_tnudge_si.o messy_trexp_si.o messy_tropop_si.o messy_trsync_si.o messy_ubcnox_e5.o messy_vahr_e5.o messy_vaxtra_si.o messy_vertex_si.o messy_viso_si.o mo_advection.o mo_base_types.o mo_buffer_fft.o mo_call_trans.o mo_clim.o mo_constants.o mo_control.o mo_decomposition.o mo_diag_tendency.o mo_diff.o mo_doctor.o mo_exception.o mo_fft991.o mo_fft992.o mo_field.o mo_filename.o mo_forecast_switches.o mo_gaussgrid.o mo_geoloc.o mo_gl1.o mo_global_op.o mo_grib.o mo_hdiff.o mo_hyb.o mo_interpo.o mo_io.o mo_kind.o mo_legendre.o mo_linked_list.o mo_machine.o mo_memory_base.o mo_memory_f.o mo_memory_g1a.o mo_memory_g1b.o mo_memory_g2a.o mo_memory_g2b.o mo_memory_g3a.o mo_memory_g3b.o mo_memory_gl.o mo_memory_ls.o mo_memory_sp.o mo_memory_streams.o mo_mpi.o mo_namelist.o mo_netcdf.o mo_netcdfstream.o mo_nmi.o mo_nudging.o mo_nudging_buffer.o mo_nudging_constants.o mo_nudging_correl.o mo_nudging_init.o mo_nudging_io.o mo_nudging_pattern.o mo_nudging_sst.o mo_nudging_utils.o mo_parameters.o mo_parrrtm.o mo_port_test.o mo_real_timer.o mo_scan_buffer.o mo_semi_impl.o mo_semi_lagrangian.o mo_specfun.o mo_spectral.o mo_spitfire.o mo_sst.o mo_test_trans.o mo_time_base.o mo_time_control.o mo_time_conversion.o mo_time_event.o mo_time_manager.o mo_timer.o mo_timestamp.o mo_tmp_buffer.o mo_tpcore.o mo_tr_allgather.o mo_tr_gather.o mo_transpose.o mo_truncation.o mo_upper_sponge.o mo_util_string.o pgrad.o physc.o pres.o presf.o readfld.o scan1.o scan2.o sccd.o scctp.o setdyn.o si1.o si2.o stepon.o sudif.o sym1.o sym2.o tf1.o tf2.o mo_echam_yaxt.o -L../../lib -lmpiom -L../../lib -lsupport -L../lib -lmessy -lisorropia -lqhull -L/gpfs/software/juwels/stages/2018a/software/netCDF/4.6.1-ipsmpi-2018a/lib64 -lnetcdf -L/gpfs/software/juwels/stages/2018a/software/netCDF-Fortran/4.4.4-ipsmpi-2018a/lib -lnetcdff -L/gpfs/software/juwels/stages/2018a/software/YAXT/0.6.0-ipsmpi-2018a/lib -lyaxt -L../../lib -llapack -L../../lib -lblas
I tried changing the order of the libraries, adding extra -lyaxt before, after, etc. The library does contain the symbol:
19:16:00|cstao05#juwels09:[__LINUX64]> readelf -s /gpfs/software/juwels/stages/2018a/software/YAXT/0.6.0-ipsmpi-2018a/lib/libyaxt.so | grep xt_finalize
28: 0000000000000000 0 FUNC GLOBAL DEFAULT UND xt_finalized
45: 0000000000000000 0 FUNC GLOBAL DEFAULT UND xt_finalize
126: 000000000000c230 32 FUNC GLOBAL DEFAULT 13 xt_core_mp_xt_finalized_
671: 0000000000000000 0 FUNC GLOBAL DEFAULT UND xt_finalized
740: 0000000000000000 0 FUNC GLOBAL DEFAULT UND xt_finalize
947: 000000000000c230 32 FUNC GLOBAL DEFAULT 13 xt_core_mp_xt_finalized_
As well as
nm /gpfs/software/juwels/stages/2018a/software/YAXT/0.6.0-ipsmpi-2018a/lib/libyaxt.so | grep xt_finalize
000000000000c230 T xt_core_mp_xt_finalized_
U xt_finalize
U xt_finalized
I have read all the other answers here, and I still can't figure this one out.
The missing library was lyaxt_c (I missed the _c). Fixing the Makefile worked.

How do I resolve this error in the Raspberry Pi Kernel file bounds.c?

I am new to kernel compilation. I want to create the Blinking LED driver for Raspberry Pi 1 Model B but as a first step towards the goal, I am trying to cross-compile unmodified Raspberry pi Kernel and following this article.
Everything goes fine until step 7. In step 7, when I enter cross compile command, it shows this:
$ make ARCH=arm CROSS_COMPILE=${CCPREFIX}
CHK include/config/kernel.release
CHK include/generated/uapi/linux/version.h
CHK include/generated/utsrelease.h
make[1]: 'include/generated/mach-types.h' is up to date.
CC kernel/bounds.s
In file included from ./arch/arm/include/asm/bug.h:6:0,
from include/linux/bug.h:4,
from include/linux/page-flags.h:9,
from kernel/bounds.c:9:
./arch/arm/include/asm/opcodes.h:14:52: error: unknown type name 'u32'
./arch/arm/include/asm/opcodes.h:14:64: error: unknown type name 'u32'
In file included from ./arch/arm/include/asm/irqflags.h:6:0,
from include/linux/irqflags.h:15,
from ./arch/arm/include/asm/bitops.h:27,
from include/linux/bitops.h:36,
from include/linux/log2.h:16,
from kernel/bounds.c:12:
./arch/arm/include/asm/ptrace.h:125:1: error: unknown type name 'bool'
./arch/arm/include/asm/ptrace.h: In function 'regs_get_register':
./arch/arm/include/asm/ptrace.h:141:6: error: expected expression before 'struct'
In file included from include/linux/bitops.h:36:0,
from include/linux/log2.h:16,
from kernel/bounds.c:12:
./arch/arm/include/asm/bitops.h: In function '____atomic_set_bit':
./arch/arm/include/asm/bitops.h:38:23: error: 'BITS_PER_LONG' undeclared (first use in this function)
./arch/arm/include/asm/bitops.h:38:23: note: each undeclared identifier is reported only once for each function it appears in
./arch/arm/include/asm/bitops.h: In function '____atomic_clear_bit':
./arch/arm/include/asm/bitops.h:50:23: error: 'BITS_PER_LONG' undeclared (first use in this function)
./arch/arm/include/asm/bitops.h: In function '____atomic_change_bit':
./arch/arm/include/asm/bitops.h:62:23: error: 'BITS_PER_LONG' undeclared (first use in this function)
./arch/arm/include/asm/bitops.h: In function '____atomic_test_and_set_bit':
./arch/arm/include/asm/bitops.h:76:23: error: 'BITS_PER_LONG' undeclared (first use in this function)
./arch/arm/include/asm/bitops.h: In function '____atomic_test_and_clear_bit':
./arch/arm/include/asm/bitops.h:93:23: error: 'BITS_PER_LONG' undeclared (first use in this function)
./arch/arm/include/asm/bitops.h: In function '____atomic_test_and_change_bit':
./arch/arm/include/asm/bitops.h:110:23: error: 'BITS_PER_LONG' undeclared (first use in this function)
In file included from ./arch/arm/include/asm/bitops.h:122:0,
from include/linux/bitops.h:36,
from include/linux/log2.h:16,
from kernel/bounds.c:12:
include/asm-generic/bitops/non-atomic.h: In function '__set_bit':
include/asm-generic/bitops/non-atomic.h:17:23: error: 'BITS_PER_LONG' undeclared (first use in this function)
include/asm-generic/bitops/non-atomic.h: In function '__clear_bit':
include/asm-generic/bitops/non-atomic.h:25:23: error: 'BITS_PER_LONG' undeclared (first use in this function)
include/asm-generic/bitops/non-atomic.h: In function '__change_bit':
include/asm-generic/bitops/non-atomic.h:42:23: error: 'BITS_PER_LONG' undeclared (first use in this function)
include/asm-generic/bitops/non-atomic.h: In function '__test_and_set_bit':
include/asm-generic/bitops/non-atomic.h:59:23: error: 'BITS_PER_LONG' undeclared (first use in this function)
include/asm-generic/bitops/non-atomic.h: In function '__test_and_clear_bit':
include/asm-generic/bitops/non-atomic.h:78:23: error: 'BITS_PER_LONG' undeclared (first use in this function)
include/asm-generic/bitops/non-atomic.h: In function '__test_and_change_bit':
include/asm-generic/bitops/non-atomic.h:90:23: error: 'BITS_PER_LONG' undeclared (first use in this function)
include/asm-generic/bitops/non-atomic.h: In function 'test_bit':
include/asm-generic/bitops/non-atomic.h:105:21: error: 'BITS_PER_LONG' undeclared (first use in this function)
In file included from ./arch/arm/include/asm/bitops.h:312:0,
from include/linux/bitops.h:36,
from include/linux/log2.h:16,
from kernel/bounds.c:12:
include/asm-generic/bitops/fls64.h: At top level:
include/asm-generic/bitops/fls64.h:33:2: error: #error BITS_PER_LONG not 32 or 64
In file included from ./arch/arm/include/asm/bitops.h:314:0,
from include/linux/bitops.h:36,
from include/linux/log2.h:16,
from kernel/bounds.c:12:
include/asm-generic/bitops/sched.h: In function 'sched_find_first_bit':
include/asm-generic/bitops/sched.h:27:2: error: #error BITS_PER_LONG not defined
In file included from include/linux/log2.h:16:0,
from kernel/bounds.c:12:
include/linux/bitops.h: At top level:
include/linux/bitops.h:202:37: error: unknown type name 'u64'
include/linux/bitops.h:208:2: error: #error BITS_PER_LONG not 32 or 64
In file included from kernel/bounds.c:12:0:
include/linux/log2.h:32:17: error: unknown type name 'u32'
include/linux/log2.h:40:17: error: unknown type name 'u64'
include/linux/log2.h:52:1: error: unknown type name 'bool'
Kbuild:44: recipe for target 'kernel/bounds.s' failed
make[1]: *** [kernel/bounds.s] Error 1
Makefile:1004: recipe for target 'prepare0' failed
make: *** [prepare0] Error 2
I have not made any changes in any kernel file. I am not sure why bounds.c has a problem. Also, I downloaded the compressed version of the kernel file so I don't think it is a checkout/update issue. I have to confess I am confused as to what this error actually means. Am I missing something?
Thanks in advance
EDIT:
(1) printenv before step #6
$ printenv
XDG_VTNR=7
XDG_SESSION_ID=c2
CLUTTER_IM_MODULE=xim
XDG_GREETER_DATA_DIR=/var/lib/lightdm-data/omkar
SESSION=ubuntu
GPG_AGENT_INFO=/home/omkar/.gnupg/S.gpg-agent:0:1
SHELL=/bin/bash
TERM=xterm-256color
VTE_VERSION=4205
QT_LINUX_ACCESSIBILITY_ALWAYS_ON=1
WINDOWID=58720266
KERNEL_SRC=/home/bhargav/rpi/linux-rpi-3.2.27
OLDPWD=/home/omkar/rpi
UPSTART_SESSION=unix:abstract=/com/ubuntu/upstart-session/1000/1623
GNOME_KEYRING_CONTROL=
GTK_MODULES=gail:atk-bridge:unity-gtk-module
USER=omkar
LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:
QT_ACCESSIBILITY=1
XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session0
XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0
SSH_AUTH_SOCK=/run/user/1000/keyring/ssh
DEFAULTS_PATH=/usr/share/gconf/ubuntu.default.path
XDG_CONFIG_DIRS=/etc/xdg/xdg-ubuntu:/usr/share/upstart/xdg:/etc/xdg
PATH=/home/omkar/bin:/home/omkar/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
DESKTOP_SESSION=ubuntu
QT_IM_MODULE=ibus
QT_QPA_PLATFORMTHEME=appmenu-qt5
XDG_SESSION_TYPE=x11
PWD=/home/omkar/rpi/linux-rpi-4.4.y
JOB=unity-settings-daemon
XMODIFIERS=#im=ibus
GNOME_KEYRING_PID=
LANG=en_US.UTF-8
GDM_LANG=en_US
MANDATORY_PATH=/usr/share/gconf/ubuntu.mandatory.path
IM_CONFIG_PHASE=1
COMPIZ_CONFIG_PROFILE=ubuntu
GDMSESSION=ubuntu
SESSIONTYPE=gnome-session
GTK2_MODULES=overlay-scrollbar
HOME=/home/omkar
XDG_SEAT=seat0
SHLVL=1
LANGUAGE=en_US
GNOME_DESKTOP_SESSION_ID=this-is-deprecated
UPSTART_INSTANCE=
UPSTART_EVENTS=xsession started
XDG_SESSION_DESKTOP=ubuntu
LOGNAME=omkar
COMPIZ_BIN_PATH=/usr/bin/
QT4_IM_MODULE=xim
XDG_DATA_DIRS=/usr/share/ubuntu:/usr/share/gnome:/usr/local/share/:/usr/share/:/var/lib/snapd/desktop
DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-S9i5BrLSwB
CCPREFIX=/home/omkar/rpi/tools-master/arm-bcm2708/arm-bcm2708-linux-gnueabi/bin/arm-bcm2708-linux-gnueabi-
LESSOPEN=| /usr/bin/lesspipe %s
INSTANCE=
UPSTART_JOB=unity7
XDG_RUNTIME_DIR=/run/user/1000
DISPLAY=:0
XDG_CURRENT_DESKTOP=Unity
GTK_IM_MODULE=ibus
LESSCLOSE=/usr/bin/lesspipe %s %s
XAUTHORITY=/home/omkar/.Xauthority
_=/usr/bin/printenv
(2) Output of step #6
$ make ARCH=arm CROSS_COMPILE=${CCPREFIX} bcmrpi_defconfig
HOSTCC scripts/basic/fixdep
HOSTCC scripts/kconfig/conf.o
SHIPPED scripts/kconfig/zconf.tab.c
SHIPPED scripts/kconfig/zconf.lex.c
SHIPPED scripts/kconfig/zconf.hash.c
HOSTCC scripts/kconfig/zconf.tab.o
HOSTLD scripts/kconfig/conf
#
# configuration written to .config
#

GCC Linker cannot locate library

I'm trying to compile the PCRE library into a testing executable.
The documentation states that running Make and then configure should generate the library.
In the PCRE source directory:
Make
./configure
gcc -o test test.c -L . -lpcre
However the following error returns:
/usr/bin/ld: cannot find -pcre
collect2: error: ld returned 1 exit status
Note: I've also tried flag -libpcre. I was able to sucessfully run this on MacOS (seperately compiled but same library source code and same testiing source code).
Directory Contents:
132html pcre16_globals.c
aclocal.m4 pcre16_jit_compile.c
AUTHORS pcre16_maketables.c
ChangeLog pcre16_newline.c
CheckMan pcre16_ord2utf16.c
CleanTxt pcre16_printint.c
cmake pcre16_refcount.c
CMakeLists.txt pcre16_string_utils.c
compile pcre16_study.c
config-cmake.h.in pcre16_tables.c
config.guess pcre16_ucd.c
config.h pcre16_utf16_utils.c
config.h.generic pcre16_valid_utf16.c
config.h.in pcre16_version.c
config.log pcre16_xclass.c
config.status pcre32_byte_order.c
config.sub pcre32_chartables.c
configure pcre32_compile.c
configure.ac pcre32_config.c
COPYING pcre32_dfa_exec.c
depcomp pcre32_exec.c
Detrail pcre32_fullinfo.c
dftables.c pcre32_get.c
doc pcre32_globals.c
HACKING pcre32_jit_compile.c
INSTALL pcre32_maketables.c
install-sh pcre32_newline.c
libpcre16.pc pcre32_ord2utf32.c
libpcre16.pc.in pcre32_printint.c
libpcre32.pc pcre32_refcount.c
libpcre32.pc.in pcre32_string_utils.c
libpcrecpp.la pcre32_study.c
libpcrecpp_la-pcrecpp.lo pcre32_tables.c
libpcrecpp_la-pcrecpp.o pcre32_ucd.c
libpcrecpp_la-pcre_scanner.lo pcre32_utf32_utils.c
libpcrecpp_la-pcre_scanner.o pcre32_valid_utf32.c
libpcrecpp_la-pcre_stringpiece.lo pcre32_version.c
libpcrecpp_la-pcre_stringpiece.o pcre32_xclass.c
libpcrecpp.pc pcre_byte_order.c
libpcrecpp.pc.in pcre_chartables.c
libpcre.la pcre_chartables.c.dist
libpcre_la-pcre_byte_order.lo pcre_compile.c
libpcre_la-pcre_byte_order.o pcre-config
libpcre_la-pcre_chartables.lo pcre_config.c
libpcre_la-pcre_chartables.o pcre-config.in
libpcre_la-pcre_compile.lo pcrecpparg.h
libpcre_la-pcre_compile.o pcrecpparg.h.in
libpcre_la-pcre_config.lo pcrecpp.cc
libpcre_la-pcre_config.o pcrecpp.h
libpcre_la-pcre_dfa_exec.lo pcrecpp_internal.h
libpcre_la-pcre_dfa_exec.o pcrecpp_unittest
libpcre_la-pcre_exec.lo pcrecpp_unittest.cc
libpcre_la-pcre_exec.o pcrecpp_unittest-pcrecpp_unittest.o
libpcre_la-pcre_fullinfo.lo pcredemo
libpcre_la-pcre_fullinfo.o pcredemo.c
libpcre_la-pcre_get.lo pcre_dfa_exec.c
libpcre_la-pcre_get.o pcre_exec.c
libpcre_la-pcre_globals.lo pcre_fullinfo.c
libpcre_la-pcre_globals.o pcre_get.c
libpcre_la-pcre_jit_compile.lo pcregexp.pas
libpcre_la-pcre_jit_compile.o pcre_globals.c
libpcre_la-pcre_maketables.lo pcregrep
libpcre_la-pcre_maketables.o pcregrep.c
libpcre_la-pcre_newline.lo pcregrep-pcregrep.o
libpcre_la-pcre_newline.o pcre.h
libpcre_la-pcre_ord2utf8.lo pcre.h.generic
libpcre_la-pcre_ord2utf8.o pcre.h.in
libpcre_la-pcre_refcount.lo pcre_internal.h
libpcre_la-pcre_refcount.o pcre_jit_compile.c
libpcre_la-pcre_string_utils.lo pcre_jit_test.c
libpcre_la-pcre_string_utils.o pcre_maketables.c
libpcre_la-pcre_study.lo pcre_newline.c
libpcre_la-pcre_study.o pcre_ord2utf8.c
libpcre_la-pcre_tables.lo pcreposix.c
libpcre_la-pcre_tables.o pcreposix.h
libpcre_la-pcre_ucd.lo pcre_printint.c
libpcre_la-pcre_ucd.o pcre_refcount.c
libpcre_la-pcre_valid_utf8.lo pcre_scanner.cc
libpcre_la-pcre_valid_utf8.o pcre_scanner.h
libpcre_la-pcre_version.lo pcre_scanner_unittest
libpcre_la-pcre_version.o pcre_scanner_unittest.cc
libpcre_la-pcre_xclass.lo pcre_scanner_unittest-pcre_scanner_unittest.o
libpcre_la-pcre_xclass.o pcre_stringpiece.cc
libpcre.pc pcre_stringpiece.h
libpcre.pc.in pcre_stringpiece.h.in
libpcreposix.la pcre_stringpiece_unittest
libpcreposix_la-pcreposix.lo pcre_stringpiece_unittest.cc
libpcreposix_la-pcreposix.o pcre_stringpiece_unittest-pcre_stringpiece_unittest.o
libpcreposix.pc pcre_string_utils.c
libpcreposix.pc.in pcre_study.c
libtool pcre_tables.c
LICENCE pcretest
ltmain.sh pcre_test.c
m4 pcretest.c
Makefile pcretest-pcre_printint.o
Makefile.am pcretest-pcretest.o
Makefile.in pcre_ucd.c
makevp.bat pcre_valid_utf8.c
makevp_c.txt pcre_version.c
makevp_l.txt pcre_xclass.c
missing perltest.pl
NEWS PrepareRelease
NON-AUTOTOOLS-BUILD README
NON-UNIX-USE RunGrepTest
pcre16_byte_order.c RunTest
pcre16_chartables.c RunTest.bat
pcre16_compile.c sljit
pcre16_config.c stamp-h1
pcre16_dfa_exec.c test.c
pcre16_exec.c testdata
pcre16_fullinfo.c ucp.h
pcre16_get.c
Try -lpcre not -libpcre when you link. -l assumes the lib prefix and takes the name of the lib so -lpcre looks for libpcre

Autotool automake output executable filename with version

I'm trying to add to the output executable filename of a autotool project the version number.
With libs is very simple: you can add -version-info option to Makefile.am
How can I do the same thing with bin_PROGRAMS
So far I tried:
HELLO_VERSION_CURRENT = 1
HELLO_VERSION_REVISION = 2
HELLO_VERSION_AGE = 1
bin_PROGRAMS = hello_${HELLO_VERSION_CURRENT}_${HELLO_VERSION_REVISION}_${HELLO_VERSION_AGE}
hello_SOURCES = hello.c
In this way it doesn't compile because of SOURCES must be: hello_1_2_1_SOURCES, but I don't know how to tell to automake that.
Another way could be to run a post-build script: how can I add post-build action to Makefile.am?
How about using some preset autoconf output variables in your Makefile.am:
bin_PROGRAMS = hello_#PACKAGE_VERSION#
hello_#PACKAGE_VERSION#_SOURCES = hello.c
The preceding works for me on Darwin with autoconf v2.69 and automake v1.15.
Using the PACKAGE_VERSION from within your source code is even easier: #include "config.h", that's where all the autoconf output variables are #defined. E.g.:
/* config.h. Generated from config.h.in by configure. */
/* config.h.in. Generated from configure.ac by autoheader. */
...
#define PACKAGE_VERSION "1.2.3-rc-whatever"
Reference:
https://www.gnu.org/software/autoconf/manual/autoconf#Output-Variable-Index
You can do it like this:
HELLO_VERSION_CURRENT = 1
HELLO_VERSION_REVISION = 2
HELLO_VERSION_AGE = 1
bin_PROGRAMS = hello_$(HELLO_VERSION_CURRENT)_$(HELLO_VERSION_REVISION)_$(HELLO_VERSION_AGE)
hello_$(HELLO_VERSION_CURRENT)_$(HELLO_VERSION_REVISION)_$(HELLO_VERSION_AGE)_SOURCES = hello.c
Although, in that case, I'd suggest making shorter variable names...
At the end I add the following to my Makefile.am
all:
cp ./.libs/hello ./.libs/hello_${HELLO_VERSION_CURRENT}_${HELLO_VERSION_REVISION}_${HELLO_VERSION_AGE}
EDIT
I found a new solution
HELLO_VERSION_CURRENT = 1
HELLO_VERSION_REVISION = 2
HELLO_VERSION_AGE = 1
bin_PROGRAMS = hello_$(HELLO_VERSION_CURRENT)_$(HELLO_VERSION_REVISION)_$(HELLO_VERSION_AGE)
hello___HELLO_VERSION_CURRENT____HELLO_VERSION_REVISION____HELLO_VERSION_AGE__SOURCES = hello.c
hello___HELLO_VERSION_CURRENT____HELLO_VERSION_REVISION____HELLO_VERSION_AGE__CFLAGS =
hello___HELLO_VERSION_CURRENT____HELLO_VERSION_REVISION____HELLO_VERSION_AGE__LDFLAGS =
AM_CFLAGS = #hello___HELLO_VERSION_CURRENT____HELLO_VERSION_REVISION____HELLO_VERSION_AGE__CFLAGS#
AM_LDFLAGS = #hello___HELLO_VERSION_CURRENT____HELLO_VERSION_REVISION____HELLO_VERSION_AGE__LDFLAGS#
CLEANFILES = *~

Resources