Issue with installing Lua-cURL on LuaRocks - windows

I'm trying to install Lua-cURL on LuaRocks, but get an error.
cURL Version: Windows 64 bit
cURL Download Link: (https://curl.se/windows/dl-7.82.0_1/curl-7.82.0_1-win64-mingw.zip)
Command:
luarocks install lua-curl CURL_DIR=C:\curl-7.82.0_1-win64-mingw
Error:
collect2.exe: error: ld returned 1 exit status
Error: Build error: Failed compiling module lcurl.dll
Command Output:
C:\WINDOWS\system32>luarocks install lua-curl CURL_DIR=C:\curl-7.82.0_1-win64-mingw
Installing https://luarocks.org/lua-curl-0.3.13-1.src.rock
lua-curl 0.3.13-1 depends on lua >= 5.1, < 5.5 (5.1-1 provided by VM)
C:\i686-6.4.0-release-win32-dwarf-rt_v5-rev0\mingw32\bin\gcc.exe -O2 -c -o src/l52util.o -IC:\Program Files (x86)\LuaRocks\include src/l52util.c -IC:\curl-7.82.0_1-win64-mingw/include
C:\i686-6.4.0-release-win32-dwarf-rt_v5-rev0\mingw32\bin\gcc.exe -O2 -c -o src/lceasy.o -IC:\Program Files (x86)\LuaRocks\include src/lceasy.c -IC:\curl-7.82.0_1-win64-mingw/include
C:\i686-6.4.0-release-win32-dwarf-rt_v5-rev0\mingw32\bin\gcc.exe -O2 -c -o src/lcerror.o -IC:\Program Files (x86)\LuaRocks\include src/lcerror.c -IC:\curl-7.82.0_1-win64-mingw/include
C:\i686-6.4.0-release-win32-dwarf-rt_v5-rev0\mingw32\bin\gcc.exe -O2 -c -o src/lchttppost.o -IC:\Program Files (x86)\LuaRocks\include src/lchttppost.c -IC:\curl-7.82.0_1-win64-mingw/include
C:\i686-6.4.0-release-win32-dwarf-rt_v5-rev0\mingw32\bin\gcc.exe -O2 -c -o src/lcurl.o -IC:\Program Files (x86)\LuaRocks\include src/lcurl.c -IC:\curl-7.82.0_1-win64-mingw/include
C:\i686-6.4.0-release-win32-dwarf-rt_v5-rev0\mingw32\bin\gcc.exe -O2 -c -o src/lcutils.o -IC:\Program Files (x86)\LuaRocks\include src/lcutils.c -IC:\curl-7.82.0_1-win64-mingw/include
C:\i686-6.4.0-release-win32-dwarf-rt_v5-rev0\mingw32\bin\gcc.exe -O2 -c -o src/lcmulti.o -IC:\Program Files (x86)\LuaRocks\include src/lcmulti.c -IC:\curl-7.82.0_1-win64-mingw/include
C:\i686-6.4.0-release-win32-dwarf-rt_v5-rev0\mingw32\bin\gcc.exe -O2 -c -o src/lcshare.o -IC:\Program Files (x86)\LuaRocks\include src/lcshare.c -IC:\curl-7.82.0_1-win64-mingw/include
C:\i686-6.4.0-release-win32-dwarf-rt_v5-rev0\mingw32\bin\gcc.exe -O2 -c -o src/lcmime.o -IC:\Program Files (x86)\LuaRocks\include src/lcmime.c -IC:\curl-7.82.0_1-win64-mingw/include
C:\i686-6.4.0-release-win32-dwarf-rt_v5-rev0\mingw32\bin\gcc.exe -O2 -c -o src/lcurlapi.o -IC:\Program Files (x86)\LuaRocks\include src/lcurlapi.c -IC:\curl-7.82.0_1-win64-mingw/include
C:\i686-6.4.0-release-win32-dwarf-rt_v5-rev0\mingw32\bin\gcc.exe -shared -o lcurl.dll src/l52util.o src/lceasy.o src/lcerror.o src/lchttppost.o src/lcurl.o src/lcutils.o src/lcmulti.o src/lcshare.o src/lcmime.o src/lcurlapi.o -LC:\curl-7.82.0_1-win64-mingw/lib -llibcurl -lws2_32 C:\Program Files (x86)\LuaRocks/lua5.1.lib -lMSVCR80
src/lceasy.o:lceasy.c:(.text+0xe2f): undefined reference to `_imp__curl_easy_setopt'
src/lceasy.o:lceasy.c:(.text+0x1ada): undefined reference to `_imp__curl_easy_init'
src/lceasy.o:lceasy.c:(.text+0x1d6d): undefined reference to `_imp__curl_easy_cleanup'
src/lceasy.o:lceasy.c:(.text+0x1de3): undefined reference to `_imp__curl_easy_upkeep'
src/lceasy.o:lceasy.c:(.text+0x1ea2): undefined reference to `_imp__curl_easy_perform'
src/lceasy.o:lceasy.c:(.text+0x1fe0): undefined reference to `_imp__curl_easy_unescape'
src/lceasy.o:lceasy.c:(.text+0x2003): undefined reference to `_imp__curl_free'
src/lceasy.o:lceasy.c:(.text+0x2088): undefined reference to `_imp__curl_easy_escape'
src/lceasy.o:lceasy.c:(.text+0x20a3): undefined reference to `_imp__curl_free'
src/lceasy.o:lceasy.c:(.text+0x2103): undefined reference to `_imp__curl_easy_reset'
src/lceasy.o:lceasy.c:(.text+0x2196): undefined reference to `_imp__curl_easy_pause'
src/lceasy.o:lceasy.c:(.text+0x2270): undefined reference to `_imp__curl_easy_getinfo'
src/lceasy.o:lceasy.c:(.text+0x2450): undefined reference to `_imp__curl_easy_getinfo'
src/lceasy.o:lceasy.c:(.text+0x2560): undefined reference to `_imp__curl_easy_getinfo'
src/lceasy.o:lceasy.c:(.text+0x26e0): undefined reference to `_imp__curl_easy_getinfo'
src/lceasy.o:lceasy.c:(.text+0x2701): undefined reference to `_imp__curl_slist_free_all'
src/lceasy.o:lceasy.c:(.text+0x2790): undefined reference to `_imp__curl_easy_getinfo'
src/lceasy.o:lceasy.c:(.text+0x28e1): undefined reference to `_imp__curl_easy_setopt'
src/lceasy.o:lceasy.c:(.text+0x29d3): undefined reference to `_imp__curl_easy_setopt'
src/lceasy.o:lceasy.c:(.text+0x2a73): undefined reference to `_imp__curl_easy_setopt'
src/lceasy.o:lceasy.c:(.text+0x2b13): undefined reference to `_imp__curl_easy_setopt'
src/lceasy.o:lceasy.c:(.text+0x2bb3): undefined reference to `_imp__curl_easy_setopt'
src/lceasy.o:lceasy.c:(.text+0x2c51): more undefined references to `_imp__curl_easy_setopt' follow
src/lceasy.o:lceasy.c:(.text+0x49a4): undefined reference to `_imp__curl_slist_free_all'
src/lceasy.o:lceasy.c:(.text+0x4ba1): undefined reference to `_imp__curl_easy_setopt'
src/lceasy.o:lceasy.c:(.text+0x4c54): undefined reference to `_imp__curl_easy_setopt'
src/lceasy.o:lceasy.c:(.text+0x4d0f): undefined reference to `_imp__curl_easy_setopt'
src/lceasy.o:lceasy.c:(.text+0x4fe4): undefined reference to `_imp__curl_easy_setopt'
src/lceasy.o:lceasy.c:(.text+0x5141): undefined reference to `_imp__curl_easy_setopt'
src/lceasy.o:lceasy.c:(.text+0x51ec): more undefined references to `_imp__curl_easy_setopt' follow
src/lceasy.o:lceasy.c:(.text+0x5e1f): undefined reference to `_imp__curl_slist_free_all'
src/lceasy.o:lceasy.c:(.text+0x5e3e): undefined reference to `_imp__curl_easy_setopt'
src/lceasy.o:lceasy.c:(.text+0x5e89): undefined reference to `_imp__curl_slist_free_all'
src/lceasy.o:lceasy.c:(.text+0x6077): undefined reference to `_imp__curl_easy_getinfo'
src/lceasy.o:lceasy.c:(.text+0x68e9): undefined reference to `_imp__curl_easy_setopt'
src/lceasy.o:lceasy.c:(.text+0x898d): undefined reference to `_imp__curl_easy_setopt'
src/lceasy.o:lceasy.c:(.text+0x8fae): undefined reference to `_imp__curl_easy_setopt'
src/lcerror.o:lcerror.c:(.text+0x1aa): undefined reference to `_imp__curl_easy_strerror'
src/lcerror.o:lcerror.c:(.text+0x1b7): undefined reference to `_imp__curl_multi_strerror'
src/lcerror.o:lcerror.c:(.text+0x1c5): undefined reference to `_imp__curl_share_strerror'
src/lchttppost.o:lchttppost.c:(.text+0x3a8): undefined reference to `_imp__curl_formfree'
src/lchttppost.o:lchttppost.c:(.text+0x512): undefined reference to `_imp__curl_formget'
src/lchttppost.o:lchttppost.c:(.text+0x5b7): undefined reference to `_imp__curl_formget'
src/lchttppost.o:lchttppost.c:(.text+0x644): undefined reference to `_imp__curl_formget'
src/lchttppost.o:lchttppost.c:(.text+0xa8f): undefined reference to `_imp__curl_formadd'
src/lchttppost.o:lchttppost.c:(.text+0xd99): undefined reference to `_imp__curl_formadd'
src/lchttppost.o:lchttppost.c:(.text+0xf18): undefined reference to `_imp__curl_slist_free_all'
src/lchttppost.o:lchttppost.c:(.text+0x105f): undefined reference to `_imp__curl_formadd'
src/lchttppost.o:lchttppost.c:(.text+0x118a): undefined reference to `_imp__curl_formadd'
src/lchttppost.o:lchttppost.c:(.text+0x1199): undefined reference to `_imp__curl_slist_free_all'
src/lchttppost.o:lchttppost.c:(.text+0x143f): undefined reference to `_imp__curl_formadd'
src/lchttppost.o:lchttppost.c:(.text+0x144e): undefined reference to `_imp__curl_slist_free_all'
src/lchttppost.o:lchttppost.c:(.text+0x154e): undefined reference to `_imp__curl_formadd'
src/lchttppost.o:lchttppost.c:(.text+0x16fb): undefined reference to `_imp__curl_formadd'
src/lchttppost.o:lchttppost.c:(.text+0x170a): undefined reference to `_imp__curl_slist_free_all'
src/lchttppost.o:lchttppost.c:(.text+0x1803): undefined reference to `_imp__curl_formadd'
src/lcurl.o:lcurl.c:(.text+0x358): undefined reference to `_imp__curl_easy_option_by_name'
src/lcurl.o:lcurl.c:(.text+0x3b0): undefined reference to `_imp__curl_easy_option_by_id'
src/lcurl.o:lcurl.c:(.text+0x490): undefined reference to `_imp__curl_easy_option_next'
src/lcurl.o:lcurl.c:(.text+0x4fa): undefined reference to `_imp__curl_version_info'
src/lcurl.o:lcurl.c:(.text+0x1105): undefined reference to `_imp__curl_version'
src/lcurl.o:lcurl.c:(.text+0x1666): undefined reference to `_imp__curl_global_init'
src/lcurl.o:lcurl.c:(.text+0x16e5): undefined reference to `_imp__curl_global_init'
src/lcutils.o:lcutils.c:(.text+0x5fa): undefined reference to `_imp__curl_slist_free_all'
src/lcutils.o:lcutils.c:(.text+0x704): undefined reference to `_imp__curl_slist_append'
src/lcmulti.o:lcmulti.c:(.text+0x43a): undefined reference to `_imp__curl_multi_remove_handle'
src/lcmulti.o:lcmulti.c:(.text+0x4fa): undefined reference to `_imp__curl_multi_init'
src/lcmulti.o:lcmulti.c:(.text+0x686): undefined reference to `_imp__curl_multi_cleanup'
src/lcmulti.o:lcmulti.c:(.text+0x830): undefined reference to `_imp__curl_multi_setopt'
src/lcmulti.o:lcmulti.c:(.text+0x8c0): undefined reference to `_imp__curl_multi_setopt'
src/lcmulti.o:lcmulti.c:(.text+0x981): undefined reference to `_imp__curl_multi_setopt'
src/lcmulti.o:lcmulti.c:(.text+0xab0): undefined reference to `_imp__curl_multi_setopt'
src/lcmulti.o:lcmulti.c:(.text+0xbe5): undefined reference to `_imp__curl_multi_setopt'
src/lcmulti.o:lcmulti.c:(.text+0xcba): undefined reference to `_imp__curl_multi_socket_action'
src/lcmulti.o:lcmulti.c:(.text+0xd7a): undefined reference to `_imp__curl_multi_timeout'
src/lcmulti.o:lcmulti.c:(.text+0xe42): undefined reference to `_imp__curl_multi_wait'
src/lcmulti.o:lcmulti.c:(.text+0xe9f): undefined reference to `_imp__curl_multi_timeout'
src/lcmulti.o:lcmulti.c:(.text+0x1134): undefined reference to `_imp__curl_multi_info_read'
src/lcmulti.o:lcmulti.c:(.text+0x1235): undefined reference to `_imp__curl_multi_remove_handle'
src/lcmulti.o:lcmulti.c:(.text+0x130a): undefined reference to `_imp__curl_multi_perform'
src/lcmulti.o:lcmulti.c:(.text+0x14a7): undefined reference to `_imp__curl_multi_add_handle'
src/lcshare.o:lcshare.c:(.text+0x7a): undefined reference to `_imp__curl_share_init'
src/lcshare.o:lcshare.c:(.text+0x1c5): undefined reference to `_imp__curl_share_cleanup'
src/lcshare.o:lcshare.c:(.text+0x261): undefined reference to `_imp__curl_share_setopt'
src/lcmime.o:lcmime.c:(.text+0x1de): undefined reference to `_imp__curl_mime_init'
src/lcmime.o:lcmime.c:(.text+0x42d): undefined reference to `_imp__curl_mime_subparts'
src/lcmime.o:lcmime.c:(.text+0x639): undefined reference to `_imp__curl_mime_free'
src/lcmime.o:lcmime.c:(.text+0x9bd): undefined reference to `_imp__curl_mime_addpart'
src/lcmime.o:lcmime.c:(.text+0xb06): undefined reference to `_imp__curl_mime_encoder'
src/lcmime.o:lcmime.c:(.text+0xbe6): undefined reference to `_imp__curl_mime_type'
src/lcmime.o:lcmime.c:(.text+0xcc6): undefined reference to `_imp__curl_mime_filename'
src/lcmime.o:lcmime.c:(.text+0xda6): undefined reference to `_imp__curl_mime_name'
src/lcmime.o:lcmime.c:(.text+0xe92): undefined reference to `_imp__curl_mime_headers'
src/lcmime.o:lcmime.c:(.text+0xeea): undefined reference to `_imp__curl_mime_headers'
src/lcmime.o:lcmime.c:(.text+0xef9): undefined reference to `_imp__curl_slist_free_all'
src/lcmime.o:lcmime.c:(.text+0x12b0): undefined reference to `_imp__curl_mime_type'
src/lcmime.o:lcmime.c:(.text+0x12d7): undefined reference to `_imp__curl_mime_name'
src/lcmime.o:lcmime.c:(.text+0x1302): undefined reference to `_imp__curl_mime_filename'
src/lcmime.o:lcmime.c:(.text+0x132f): undefined reference to `_imp__curl_mime_headers'
src/lcmime.o:lcmime.c:(.text+0x161e): undefined reference to `_imp__curl_mime_subparts'
src/lcmime.o:lcmime.c:(.text+0x16f8): undefined reference to `_imp__curl_mime_data'
src/lcmime.o:lcmime.c:(.text+0x17ef): undefined reference to `_imp__curl_mime_filedata'
src/lcurlapi.o:lcurlapi.c:(.text+0x26): undefined reference to `_imp__curl_url'
src/lcurlapi.o:lcurlapi.c:(.text+0x88): undefined reference to `_imp__curl_url_set'
src/lcurlapi.o:lcurlapi.c:(.text+0x190): undefined reference to `_imp__curl_url_get'
src/lcurlapi.o:lcurlapi.c:(.text+0x1a7): undefined reference to `_imp__curl_free'
src/lcurlapi.o:lcurlapi.c:(.text+0x1ed): undefined reference to `_imp__curl_free'
src/lcurlapi.o:lcurlapi.c:(.text+0x245): undefined reference to `_imp__curl_url_cleanup'
src/lcurlapi.o:lcurlapi.c:(.text+0x29d): undefined reference to `_imp__curl_url_dup'
src/lcurlapi.o:lcurlapi.c:(.text+0x34e): undefined reference to `_imp__curl_url_get'
src/lcurlapi.o:lcurlapi.c:(.text+0x367): undefined reference to `_imp__curl_free'
src/lcurlapi.o:lcurlapi.c:(.text+0x3bd): undefined reference to `_imp__curl_free'
src/lcurlapi.o:lcurlapi.c:(.text+0x5b7): undefined reference to `_imp__curl_url_set'
collect2.exe: error: ld returned 1 exit status
Error: Build error: Failed compiling module lcurl.dll
Any help would be highly appreciated, thanks.

I found the issue, I needed the 32 bit cURL instead of the 64 bit.
cURL Windows 32 Bit Download: https://curl.se/windows/dl-7.82.0_1/curl-7.82.0_1-win32-mingw.zip

Related

problem with make file and math.h in gcc-arm-none-eabi

i'm working on arm cortex m4 with make file and gcc-arm-none-eabi on ubuntu. when i add math .h library to my project and try to use log10f , the linker exit with errors.
its be good if help my for solve this problem and suggest source for more study ,thank you.
i used -lm but it didn't has any effect.
make file:
# PROJECT: name of the output file
PROJECT = main
SRCS = $(wildcard src/*.c) \
$(wildcard libs/*.c)
OBJ = obj/
# OBJS: list of object files
OBJS = $(addprefix $(OBJ),$(notdir $(SRCS:.c=.o)))
#Flag points to the INC folder containing header files
INC = -Iinc
# LD_SCRIPT: linker script
LD_SCRIPT = ld/GD32f30x.ld
#UTILITY VARIABLES
CC = arm-none-eabi-gcc #compiler
LD = arm-none-eabi-ld #linker
OBJCOPY =arm-none-eabi-objcopy #final executable builder
RM = rm -rf
MKDIR = #mkdir -p $(#D) #creates folders if not present
#GCC FLAGS
CFLAGS = -ggdb -mthumb -mcpu=cortex-m4 -mfpu=fpv4-sp-d16
CFLAGS += -mfloat-abi=softfp -Os -MD -std=c99 -c
#LINKER FLAGS
LDFLAGS = -T $(LD_SCRIPT) -e Reset_Handler
# Rules to build bin
all: bin/$(PROJECT).bin
$(OBJ)%.o: src/%.c #turns .c source files into object files
$(MKDIR)
$(CC) -o $# $^ $(INC) $(CFLAGS)
$(OBJ)%.o: libs/%.c #turns .c source files into object files
$(MKDIR)
$(CC) -o $# $^ $(INC) $(CFLAGS)
bin/$(PROJECT).elf: $(OBJS) ##contains debug symbols for GNU GDB
$(MKDIR)
$(LD) -o $# $^ $(LDFLAGS)
bin/$(PROJECT).bin: bin/$(PROJECT).elf #debug symbols for GNU GDB stripped by objcopy,finished binary ready for flashing
$(OBJCOPY) -O binary $< $#
#Flashes bin to TM4C
flash:
$(FLASHER) -S $(DEV) bin/$(PROJECT).bin
#remove object and bin files
clean:
-$(RM) obj
-$(RM) bin
.PHONY: all clean
errors:
arm-none-eabi-gcc -o obj/ntc_sensor.o libs/ntc_sensor.c -Iinc -I/usr/lib/arm-none-eabi/include -ggdb -mthumb -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=softfp -Os -MD -std=c99 -c
arm-none-eabi-ld -o bin/main.user obj/main.o obj/gd32f30x_rcu.o obj/gd32f30x_gpio.o obj/ntc_sensor.o obj/HT1621B.o obj/temp_ctrl.o obj/gd32f30x_it.o obj/systick.o obj/gd32f30x_pmu.o obj/system_gd32f30x.o obj/startup.o obj/gd32f30x_adc.o -T ld/GD32f30x.ld -e Reset_Handler
arm-none-eabi-ld: obj/ntc_sensor.o: in function `ln':
/home/user/project/embedded/ARM/GigaDevice/GD32f30x/Termostat/libs/ntc_sensor.c:51: undefined reference to `__aeabi_dsub'
arm-none-eabi-ld: /home/user/project/embedded/ARM/GigaDevice/GD32f30x/Termostat/libs/ntc_sensor.c:51: undefined reference to `__aeabi_dadd'
arm-none-eabi-ld: /home/user/project/embedded/ARM/GigaDevice/GD32f30x/Termostat/libs/ntc_sensor.c:51: undefined reference to `__aeabi_ddiv'
arm-none-eabi-ld: /home/user/project/embedded/ARM/GigaDevice/GD32f30x/Termostat/libs/ntc_sensor.c:56: undefined reference to `__aeabi_dcmpgt'
arm-none-eabi-ld: /home/user/project/embedded/ARM/GigaDevice/GD32f30x/Termostat/libs/ntc_sensor.c:64: undefined reference to `__aeabi_dadd'
arm-none-eabi-ld: /home/user/project/embedded/ARM/GigaDevice/GD32f30x/Termostat/libs/ntc_sensor.c:58: undefined reference to `__aeabi_dadd'
arm-none-eabi-ld: /home/user/project/embedded/ARM/GigaDevice/GD32f30x/Termostat/libs/ntc_sensor.c:60: undefined reference to `__aeabi_dadd'
arm-none-eabi-ld: /home/user/project/embedded/ARM/GigaDevice/GD32f30x/Termostat/libs/ntc_sensor.c:61: undefined reference to `__aeabi_dmul'
arm-none-eabi-ld: /home/user/project/embedded/ARM/GigaDevice/GD32f30x/Termostat/libs/ntc_sensor.c:61: undefined reference to `__aeabi_dmul'
arm-none-eabi-ld: /home/user/project/embedded/ARM/GigaDevice/GD32f30x/Termostat/libs/ntc_sensor.c:62: undefined reference to `__aeabi_ddiv'
arm-none-eabi-ld: obj/ntc_sensor.o: in function `log10':
/home/user/project/embedded/ARM/GigaDevice/GD32f30x/Termostat/libs/ntc_sensor.c:70: undefined reference to `__aeabi_dmul'
arm-none-eabi-ld: obj/ntc_sensor.o: in function `get_ntc_Temperature':
/home/user/project/embedded/ARM/GigaDevice/GD32f30x/Termostat/libs/ntc_sensor.c:121: undefined reference to `__aeabi_f2d'
arm-none-eabi-ld: /home/user/project/embedded/ARM/GigaDevice/GD32f30x/Termostat/libs/ntc_sensor.c:121: undefined reference to `__aeabi_dmul'
arm-none-eabi-ld: /home/user/project/embedded/ARM/GigaDevice/GD32f30x/Termostat/libs/ntc_sensor.c:121: undefined reference to `__aeabi_dadd'
arm-none-eabi-ld: /home/user/project/embedded/ARM/GigaDevice/GD32f30x/Termostat/libs/ntc_sensor.c:121: undefined reference to `__aeabi_d2f'
make: *** [Makefile:51: bin/main.user] Error 1
user#user-PC:~/project/embedded/ARM/GigaDevice/GD32f30x/Termostat$ make
arm-none-eabi-ld -o bin/main.user obj/main.o obj/gd32f30x_rcu.o obj/gd32f30x_gpio.o obj/ntc_sensor.o obj/HT1621B.o obj/temp_ctrl.o obj/gd32f30x_it.o obj/systick.o obj/gd32f30x_pmu.o obj/system_gd32f30x.o obj/startup.o obj/gd32f30x_adc.o -T ld/GD32f30x.ld -e Reset_Handler
arm-none-eabi-ld: obj/ntc_sensor.o: in function `ln':
/home/user/project/embedded/ARM/GigaDevice/GD32f30x/Termostat/libs/ntc_sensor.c:51: undefined reference to `__aeabi_dsub'
arm-none-eabi-ld: /home/user/project/embedded/ARM/GigaDevice/GD32f30x/Termostat/libs/ntc_sensor.c:51: undefined reference to `__aeabi_dadd'
arm-none-eabi-ld: /home/user/project/embedded/ARM/GigaDevice/GD32f30x/Termostat/libs/ntc_sensor.c:51: undefined reference to `__aeabi_ddiv'
arm-none-eabi-ld: /home/user/project/embedded/ARM/GigaDevice/GD32f30x/Termostat/libs/ntc_sensor.c:56: undefined reference to `__aeabi_dcmpgt'
arm-none-eabi-ld: /home/user/project/embedded/ARM/GigaDevice/GD32f30x/Termostat/libs/ntc_sensor.c:64: undefined reference to `__aeabi_dadd'
arm-none-eabi-ld: /home/user/project/embedded/ARM/GigaDevice/GD32f30x/Termostat/libs/ntc_sensor.c:58: undefined reference to `__aeabi_dadd'
arm-none-eabi-ld: /home/user/project/embedded/ARM/GigaDevice/GD32f30x/Termostat/libs/ntc_sensor.c:60: undefined reference to `__aeabi_dadd'
arm-none-eabi-ld: /home/user/project/embedded/ARM/GigaDevice/GD32f30x/Termostat/libs/ntc_sensor.c:61: undefined reference to `__aeabi_dmul'
arm-none-eabi-ld: /home/user/project/embedded/ARM/GigaDevice/GD32f30x/Termostat/libs/ntc_sensor.c:61: undefined reference to `__aeabi_dmul'
arm-none-eabi-ld: /home/user/project/embedded/ARM/GigaDevice/GD32f30x/Termostat/libs/ntc_sensor.c:62: undefined reference to `__aeabi_ddiv'
arm-none-eabi-ld: obj/ntc_sensor.o: in function `log10':
/home/user/project/embedded/ARM/GigaDevice/GD32f30x/Termostat/libs/ntc_sensor.c:70: undefined reference to `__aeabi_dmul'
arm-none-eabi-ld: obj/ntc_sensor.o: in function `get_ntc_Temperature':
/home/user/project/embedded/ARM/GigaDevice/GD32f30x/Termostat/libs/ntc_sensor.c:121: undefined reference to `__aeabi_f2d'
arm-none-eabi-ld: /home/user/project/embedded/ARM/GigaDevice/GD32f30x/Termostat/libs/ntc_sensor.c:121: undefined reference to `__aeabi_dmul'
arm-none-eabi-ld: /home/user/project/embedded/ARM/GigaDevice/GD32f30x/Termostat/libs/ntc_sensor.c:121: undefined reference to `__aeabi_dadd'
arm-none-eabi-ld: /home/user/project/embedded/ARM/GigaDevice/GD32f30x/Termostat/libs/ntc_sensor.c:121: undefined reference to `__aeabi_d2f'
make: *** [Makefile:51: bin/main.user] Error 1

Error when compiling my fortran code. I believe that error is in cuba library, but i installed the library correctly

I am a beginning in programming and I need help in my code in Fortran. The error displayed when compiling is
joaovitor1729#joao:~/Fortran/centrol-foton$ make teste_intmult
gfortran -O3 -c -o teste_intmult.o teste_intmult.f90
cc -L/home/joaovitor1729/lib teste_intmult.o -o teste_intmult
/usr/bin/ld: teste_intmult.o: in function `MAIN__':
teste_intmult.f90:(.text+0x93): undefined reference to `cuhre_'
/usr/bin/ld: teste_intmult.f90:(.text+0xd3): undefined reference to `_gfortran_st_write'
/usr/bin/ld: teste_intmult.f90:(.text+0xe7): undefined reference to `_gfortran_transfer_character_write'
/usr/bin/ld: teste_intmult.f90:(.text+0x14a): undefined reference to `_gfortran_transfer_array_write'
/usr/bin/ld: teste_intmult.f90:(.text+0x15a): undefined reference to `_gfortran_transfer_integer_write'
/usr/bin/ld: teste_intmult.f90:(.text+0x1b8): undefined reference to `_gfortran_transfer_array_write'
/usr/bin/ld: teste_intmult.f90:(.text+0x211): undefined reference to `_gfortran_transfer_array_write'
/usr/bin/ld: teste_intmult.f90:(.text+0x221): undefined reference to `_gfortran_transfer_integer_write'
/usr/bin/ld: teste_intmult.f90:(.text+0x229): undefined reference to `_gfortran_st_write_done'
/usr/bin/ld: teste_intmult.f90:(.text+0x2b1): undefined reference to `suave_'
/usr/bin/ld: teste_intmult.f90:(.text+0x2ec): undefined reference to `_gfortran_st_write'
/usr/bin/ld: teste_intmult.f90:(.text+0x300): undefined reference to `_gfortran_transfer_character_write'
/usr/bin/ld: teste_intmult.f90:(.text+0x35e): undefined reference to `_gfortran_transfer_array_write'
/usr/bin/ld: teste_intmult.f90:(.text+0x36e): undefined reference to `_gfortran_transfer_integer_write'
/usr/bin/ld: teste_intmult.f90:(.text+0x3cc): undefined reference to `_gfortran_transfer_array_write'
/usr/bin/ld: teste_intmult.f90:(.text+0x427): undefined reference to `_gfortran_transfer_array_write'
/usr/bin/ld: teste_intmult.f90:(.text+0x437): undefined reference to `_gfortran_transfer_integer_write'
/usr/bin/ld: teste_intmult.f90:(.text+0x43f): undefined reference to `_gfortran_st_write_done'
/usr/bin/ld: teste_intmult.o: in function `fx_':
teste_intmult.f90:(.text+0x4cd): undefined reference to `exp'
/usr/bin/ld: teste_intmult.o: in function `main':
teste_intmult.f90:(.text.startup+0x5): undefined reference to `_gfortran_set_args'
/usr/bin/ld: teste_intmult.f90:(.text.startup+0x16): undefined reference to `_gfortran_set_options'
collect2: error: ld returned 1 exit status
make: *** [<builtin>: teste_intmult] Error 1
rm teste_intmult.o
This is my Makefile
...
F90C = gfortran
F90BANDEIRAS = -O3
LDFLAGS = -L${HOME}/lib
LIBS = -ldquadpack -lm
LIBM = -lcuba -lm
OBJC = defaults.o parcom.o
EXEC =
NCLVL = 15
.SUFIXOS: .f90 .f .o
.KEEP_STATE:
#####################################
teste_intmult: ${OBJC} teste_intmult.o ${F90C} -o run.teste_intmult ${F90FLAGS} ${OBJC} teste_intmult.o ${LDFLAGS} ${LIBS}
#####################################
%.o: %.f90 ${F90C} ${F90FLAGS} -c -o $# $<
#####################################
clean: -rm -vf run.* . ~ *~ *.o a.out *.mod genmod
veryclean: -rm -vf *.o .mod . ~ ~ .exe .sh.o a.out run . genmod . *.run ############### o fim ###############

makefile undefined reference error

I'm having trouble compiling my project I am coding files wordbench2.h, wordbench2.cpp, makefile.wb2, oaa_bst.h for the main file I was given (main_wb2.cpp) I was wondering if anyone sees something wrong in my makefile
LIB = /home/courses/cop4530p/LIB
CPP = $(LIB)/cpp
TCPP = $(LIB)/tcpp
PROJ = .
INCPATH = -I$(PROJ)-I$(CPP)-I$(TCPP)
CC = g++ -std=c++11 -Wall -Wextra -I. -I$(CPP)
#target:
all: wb2.x foaa.x moaa.x
#foaa+.x
main_wb2.o: wordbench2.h main_wb2.cpp
$(CC) -c main_wb2.cpp
foaa.o: wordbench2.h foaa.cpp
$(CC) -c foaa.cpp
moaa.o: wordbench2.h moaa.cpp
$(CC) -c moaa.cpp
wordbench2.o: wordbench2.h wordbench2.cpp wordify.cpp
$(CC) -c wordbench2.cpp
xstring.o: $(CPP)/xstring.h $(CPP)/xstring.cpp
$(CC) $(INCPATH) -c $(CPP)/xstring.cpp
wb2.x: main_wb2.o wordbench2.o xstring.o
$(CC) -o wb2.x main_wb2.o
foaa.x: foaa.o wordbench2.o xstring.o
$(CC) -o foaa.x foaa.o
moaa.x: moaa.o wordbench2.o xstring.o
$(CC) -o moaa.x moaa.o
Error
g++ -std=c++11 -Wall -Wextra -I. -I/home/courses/cop4530p/LIB/cpp -o wb2.x main_wb2.o
main_wb2.o: In function `main':
main_wb2.cpp:(.text+0xfd): undefined reference to `WordBench::WordBench()'
main_wb2.cpp:(.text+0x109): undefined reference to `fsu::String::String()'
main_wb2.cpp:(.text+0x115): undefined reference to `fsu::String::String()'
main_wb2.cpp:(.text+0x1ad): undefined reference to `fsu::operator>>(std::istream&, fsu::String&)'
main_wb2.cpp:(.text+0x1c4): undefined reference to `fsu::operator<<(std::ostream&, fsu::String const&)'
main_wb2.cpp:(.text+0x1f1): undefined reference to `fsu::operator<<(std::ostream&, fsu::String const&)'
main_wb2.cpp:(.text+0x21e): undefined reference to `fsu::operator>>(std::istream&, fsu::String&)'
main_wb2.cpp:(.text+0x235): undefined reference to `fsu::operator<<(std::ostream&, fsu::String const&)'
main_wb2.cpp:(.text+0x25d): undefined reference to `WordBench::ReadText(fsu::String const&, bool)'
main_wb2.cpp:(.text+0x28f): undefined reference to `fsu::operator>>(std::istream&, fsu::String&)'
main_wb2.cpp:(.text+0x2a6): undefined reference to `fsu::operator<<(std::ostream&, fsu::String const&)'
main_wb2.cpp:(.text+0x2d3): undefined reference to `fsu::operator<<(std::ostream&, fsu::String const&)'
main_wb2.cpp:(.text+0x300): undefined reference to `fsu::operator>>(std::istream&, fsu::String&)'
main_wb2.cpp:(.text+0x317): undefined reference to `fsu::operator<<(std::ostream&, fsu::String const&)'
main_wb2.cpp:(.text+0x33f): undefined reference to `WordBench::ReadText(fsu::String const&, bool)'
main_wb2.cpp:(.text+0x371): undefined reference to `fsu::operator>>(std::istream&, fsu::String&)'
main_wb2.cpp:(.text+0x388): undefined reference to `fsu::operator<<(std::ostream&, fsu::String const&)'
main_wb2.cpp:(.text+0x3b5): undefined reference to `fsu::operator<<(std::ostream&, fsu::String const&)'
main_wb2.cpp:(.text+0x3e2): undefined reference to `fsu::operator>>(std::istream&, fsu::String&)'
main_wb2.cpp:(.text+0x3f9): undefined reference to `fsu::operator<<(std::ostream&, fsu::String const&)'
main_wb2.cpp:(.text+0x42f): undefined reference to `WordBench::WriteReport(fsu::String const&, unsigned short, unsigned short, std::_Ios_Fmtflags, std::_Ios_Fmtflags) const'
main_wb2.cpp:(.text+0x44d): undefined reference to `fsu::String::operator=(fsu::String const&)'
main_wb2.cpp:(.text+0x45e): undefined reference to `fsu::String::Size() const'
main_wb2.cpp:(.text+0x488): undefined reference to `fsu::String::Cstr() const'
main_wb2.cpp:(.text+0x4d9): undefined reference to `fsu::operator<<(std::ostream&, fsu::String const&)'
main_wb2.cpp:(.text+0x572): undefined reference to `WordBench::ClearData()'
main_wb2.cpp:(.text+0x595): undefined reference to `WordBench::ShowSummary() const'
main_wb2.cpp:(.text+0x67a): undefined reference to `fsu::String::~String()'
main_wb2.cpp:(.text+0x686): undefined reference to `fsu::String::~String()'
main_wb2.cpp:(.text+0x695): undefined reference to `WordBench::~WordBench()'
main_wb2.cpp:(.text+0x6cb): undefined reference to `fsu::String::~String()'
main_wb2.cpp:(.text+0x6dc): undefined reference to `fsu::String::~String()'
main_wb2.cpp:(.text+0x6f0): undefined reference to `WordBench::~WordBench()'
collect2: error: ld returned 1 exit status
make: *** [wb2.x] Error 1
In this rule:
wb2.x: main_wb2.o wordbench2.o xstring.o
$(CC) -o wb2.x main_wb2.o
you list wordbench2.o and xstring.o in your prerequisites list, but you didn't put them onto the compile line.
Why are you rewriting the same things over and over? That just leads to silly errors like this. Use automatic variables to avoid retyping and getting things wrong:
wb2.x: main_wb2.o wordbench2.o xstring.o
$(CC) -o $# $^
Ditto for your other linker rules.

Error during "make all" in Caffe

I had an error after running the make all command while compiling Caffe. Here is what I got (it is a snippet):
CXX .build_release/src/caffe/proto/caffe.pb.cc
AR -o .build_release/lib/libcaffe.a
LD -o .build_release/lib/libcaffe.so
CXX/LD -o .build_release/tools/upgrade_net_proto_text.bin
CXX/LD -o .build_release/tools/caffe.bin
.build_release/lib/libcaffe.so: undefined reference to `google::protobuf::io::CodedInputStream::~CodedInputStream()'
.build_release/lib/libcaffe.so: undefined reference to `google::protobuf::io::CodedInputStream::default_recursion_limit_'
.build_release/lib/libcaffe.so: undefined reference to `google::protobuf::io::CodedInputStream::BytesUntilLimit() const'
.build_release/lib/libcaffe.so: undefined reference to `google::protobuf::GoogleOnceInitImpl(int*, google::protobuf::Closure*)'
collect2: ld devolvió el estado de salida 1
make: *** [.build_release/tools/upgrade_net_proto_text.bin] Error 1
make: *** Se espera a que terminen otras tareas....
.build_release/lib/libcaffe.so: undefined reference to `google::protobuf::io::CodedInputStream::~CodedInputStream()'
.build_release/lib/libcaffe.so: undefined reference to `google::protobuf::io::CodedInputStream::default_recursion_limit_'
.build_release/lib/libcaffe.so: undefined reference to `google::protobuf::io::CodedInputStream::BytesUntilLimit() const'
.build_release/lib/libcaffe.so: undefined reference to `google::protobuf::GoogleOnceInitImpl(int*, google::protobuf::Closure*)'
collect2: ld devolvió el estado de salida 1
make: *** [.build_release/tools/caffe.bin] Error 1
How can I fix this issue?
EDIT: I'm installing it in Ubuntu 12.04.
comment out line 113 in
/usr/local/cuda/include/host_config.h.
it is because gcc 5 error

Makefile - how to fix libc dependency?

I want to statically link Tk into my code. I am running into trouble due to dependencies. The modification I made to my Makefile is:
TK_LIBS_64 = \
-L/usr/X11R6/lib64 \
-lX11 \
-lXss \
-lXext \
-L/usr/X11R6/lib64 \
-lXft \
-lX11 \
-lfontconfig \
-lfreetype \
-lxmlparse \
-lexpat \
-L/usr/X11R6/lib64 \
-lXrender \
-lpthread \
-ldl \
-lpthread \
-lieee \
-lm
LIBS64 = \
-L$(TCL_ROOT)/lib/ -ltk8.5 \
$(TK_LIBS_64)
I get the following error on compilation:
/usr/lib/../lib64/libpthread.a(pthread.o)(.text+0x7f): In function `__pthread_initialize_minimal':
: undefined reference to `__libc_setup_tls'
/usr/lib/../lib64/libpthread.a(pthread.o)(.text+0x86): In function `__pthread_initialize_minimal':
: undefined reference to `_dl_cpuclock_offset'
/usr/lib/../lib64/libpthread.a(pthread.o)(.text+0xc0): In function `__pthread_initialize_minimal':
: undefined reference to `_errno'
/usr/lib/../lib64/libpthread.a(pthread.o)(.text+0xcb): In function `__pthread_initialize_minimal':
: undefined reference to `_h_errno'
/usr/lib/../lib64/libpthread.a(pthread.o)(.text+0x289): In function `pthread_initialize':
: undefined reference to `_res'
/usr/lib/../lib64/libpthread.a(pthread.o)(.text+0x3cc): In function `pthread_initialize':
: undefined reference to `_dl_init_static_tls'
/usr/lib/../lib64/libpthread.a(pthread.o)(.text+0x947): In function `__pthread_reset_main_thread':
: undefined reference to `_errno'
/usr/lib/../lib64/libpthread.a(pthread.o)(.text+0x955): In function `__pthread_reset_main_thread':
: undefined reference to `_h_errno'
/usr/lib/../lib64/libpthread.a(pthread.o)(.text+0x963): In function `__pthread_reset_main_thread':
: undefined reference to `_res'
/usr/lib/../lib64/libpthread.a(ptw-write.o)(.text+0x1a): In function `write':
: undefined reference to `__syscall_error'
/usr/lib/../lib64/libpthread.a(ptw-write.o)(.text+0x72): In function `write':
: undefined reference to `__syscall_error'
/usr/lib/../lib64/libpthread.a(ptw-read.o)(.text+0x1a): In function `read':
: undefined reference to `__syscall_error'
/usr/lib/../lib64/libpthread.a(ptw-read.o)(.text+0x72): In function `read':
: undefined reference to `__syscall_error'
/usr/lib/../lib64/libpthread.a(ptw-close.o)(.text+0x1a): In function `close':
: undefined reference to `__syscall_error'
/usr/lib/../lib64/libpthread.a(ptw-close.o)(.text+0x5e): more undefined references to `__syscall_error' follow
/usr/lib/../lib64/libdl.a(dlopen.o)(.text+0x5): In function `dlopen':
: undefined reference to `__dlopen'
/usr/lib/../lib64/libdl.a(dlsym.o)(.text+0x5): In function `dlsym':
: undefined reference to `__dlsym'
/usr/lib/../lib64/libdl.a(dlerror.o)(.text+0x1): In function `dlerror':
: undefined reference to `__dlerror'
collect2: ld returned 1 exit status
*** Error code 1
dmake: Fatal error: Command failed for target
The undefined references are either in libc.a or libc_p.a and adding them to the dependencies does not help. Since the undefined references are system calls I think I am missing something basic here. I would be obliged if someone can point out the mistake.
use -pthread instead of -lpthread

Resources