/usr/bin/ld: cannot find -ll collect2: error: ld returned 1 exit status - lex

I am trying to compile this lex program but the i am getting this message
/usr/bin/ld: cannot find -ll
collect2: error: ld returned 1 exit status
I tried to compile by typing this
cc first.yy.c -oexe -ly

Related

Collect2: error: ld returned 1 exit status *** [.pio/build/nodemcuv2/firmware.elf] Error 1

I want to use ESP32 for my app. When I compile this code with PlatformIO I get the following error:
[env:nodemcuv2]
platform = https://github.com/Jason2866/platform-espressif32.git#feature/arduino-idf-v4.4
board = nodemcu-32s
framework = arduino
monitor_speed = 115200
I get this Error:
|-- <ESP32 BLE Arduino> 2.0.0
Building in release mode
Linking .pio/build/nodemcuv2/firmware.elf
/Users/juliusschmid/.platformio/packages/toolchain-xtensa32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: final link failed: bad value
collect2: error: ld returned 1 exit status
*** [.pio/build/nodemcuv2/firmware.elf] Error 1
I don't understand why I get this error message. Can someone help me and explain easily how I can fix the error?

Protobuf for MATLAB fails to build in Cygwin

I am trying to build the protobuf compiler for MATLAB using github.com/BraunPhilipp/protobuf-matlab (forked from farsounders code). I followed the instructions at the site and I keep getting this error:
/usr/lib/gcc/x86_64-pc-cygwin/10/../../../../x86_64-pc-cygwin/bin/ld: CMakeFiles/protoc.dir/home/kiran/protobuf/src/google/protobuf/compiler/main.cc.o:main.cc:(.text+0x2f3): undefined reference to farsounder::protobuf::compiler::matlab::MatlabGenerator::MatlabGenerator()' /usr/lib/gcc/x86_64-pc-cygwin/10/../../../../x86_64-pc-cygwin/bin/ld: CMakeFiles/protoc.dir/home/kiran/protobuf/src/google/protobuf/compiler/main.cc.o:main.cc:(.text+0x3dc): undefined reference to farsounder::protobuf::compiler::matlab::MatlabGenerator::~MatlabGenerator()' /usr/lib/gcc/x86_64-pc-cygwin/10/../../../../x86_64-pc-cygwin/bin/ld: CMakeFiles/protoc.dir/home/kiran/protobuf/src/google/protobuf/compiler/main.cc.o:main.cc:(.text+0x57e): undefined reference to `farsounder::protobuf::compiler::matlab::MatlabGenerator::~MatlabGenerator()' collect2: error: ld returned 1 exit status
Any help would be great

Redis build fails on new RaspberryPi 4 using Raspbian Buster

I am getting a linker error when trying to build redis-stable (should be 5.0.5) on raspbian buster running on the latest Raspberry Pi 4
make goes through the motions and then fails with the following
LINK redis-server
/usr/bin/ld: networking.o: in function `createClient':
/home/pi/redis-stable/src/networking.c:109: undefined reference to `__atomic_fetch_add_8'
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:219: redis-server] Error 1
make[1]: Leaving directory '/home/pi/redis-stable/src'
make: *** [Makefile:6: all] Error 2
Am I missing a setting somewhere?
I was able to get all the tests to run successfully by adding the compiler flag -latomic only to the redis-server
# redis-server
$(REDIS_SERVER_NAME): $(REDIS_SERVER_OBJ)
$(REDIS_LD) -o $# $^ ../deps/hiredis/libhiredis.a ../deps/lua/src/liblua.a $(FINAL_LIBS) -latomic
EDIT: This is with Redis 5.0.5
I was able to run by adding the compiler flag -latomic only to the haproxy
[error]
/home/pi/CQ/LB/haproxy-1.8.21/src/proto_http.c:12152: undefined reference to `__atomic_fetch_add_8'
..........................................
..........................................
/usr/bin/ld: src/proto_http.o:/home/pi/CQ/LB/haproxy-1.8.21/src/proto_http.c:4200: more undefined references to `__atomic_fetch_add_8' follow
/usr/bin/ld: src/time.o: in function `tv_update_date':
/home/pi/CQ/LB/haproxy-1.8.21/src/time.c:229: undefined reference to `__atomic_compare_exchange_8'
collect2: error: ld returned 1 exit status
make: *** [Makefile:914: haproxy] error 1
[adding]
913 haproxy: $(OPTIONS_OBJS) $(EBTREE_OBJS) $(OBJS)
914 $(LD) $(LDFLAGS) -o $# $^ $(LDOPTS) -latomic

Compiling alsa-utils 1.1.0 on Raspberry Pi

I have compiled and installed alsa-lib 1.1.0 and moved on to compiling and installing the new alsa-util. The ./configure works:
./configure --disable-bat --disable-xmlto --disable-alsaconf --with-curses=ncursesw
however the make fails and I have had no luck finding a resolution:
Making all in topology
make[1]: Entering directory '/home/pi/apps/alsa_utils/alsa-utils-1.1.0/topology'
gcc -g -O2 -o alsatplg topology.o -lasound -lasound -lm -ldl -lpthread
topology.o: In function `main':
/home/pi/apps/alsa_utils/alsa-utils-1.1.0/topology/topology.c:99: undefined reference to `snd_tplg_new'
/home/pi/apps/alsa_utils/alsa-utils-1.1.0/topology/topology.c:105: undefined reference to `snd_tplg_verbose'
/home/pi/apps/alsa_utils/alsa-utils-1.1.0/topology/topology.c:107: undefined reference to `snd_tplg_build_file'
/home/pi/apps/alsa_utils/alsa-utils-1.1.0/topology/topology.c:114: undefined reference to `snd_tplg_free'
/home/pi/apps/alsa_utils/alsa-utils-1.1.0/topology/topology.c:110: undefined reference to `snd_tplg_free'
collect2: error: ld returned 1 exit status
Makefile:318: recipe for target 'alsatplg' failed
make[1]: *** [alsatplg] Error 1
make[1]: Leaving directory '/home/pi/apps/alsa_utils/alsa-utils-1.1.0/topology'
Makefile:352: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1
I understand that this error means that undefined references exist but I cannot understand why?
Thanks.

Using Burstly and Adfonic together

I am getting the error while i am integrating Adfonic and Burstly Ad integration Frameworks are at a same time.
duplicate symbol _OBJC_IVAR_$_LoadingView.actIndicator in:
/Users/kunalthakkar/kunal/displayAds/AdfonicSDK/libAdfonic.a(ORMMAAVPlayer.o)
/Users/kunalthakkar/kunal/displayAds/BurstlySDK/libBurstly.a(BurstlyORMMAAVPlayer.o)
duplicate symbol _OBJC_CLASS_$_LoadingView in:
/Users/kunalthakkar/kunal/displayAds/AdfonicSDK/libAdfonic.a(ORMMAAVPlayer.o)
/Users/kunalthakkar/kunal/displayAds/BurstlySDK/libBurstly.a(BurstlyORMMAAVPlayer.o)
duplicate symbol _OBJC_METACLASS_$_LoadingView in:
/Users/kunalthakkar/kunal/displayAds/AdfonicSDK/libAdfonic.a(ORMMAAVPlayer.o)
/Users/kunalthakkar/kunal/displayAds/BurstlySDK/libBurstly.a(BurstlyORMMAAVPlayer.o)
ld: 3 duplicate symbols for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)