Compilation error (collect2.exe) with apex one antivirus

Hello,
I'm in charge of the deployment and maintenance of softwares in schools. Some of them are using IDE arduino (1.8.8 with arduino augmente, or 1.6.11 with ardublock 1.7). A few weeks ago, different schools observed the same error which they hadn't encountered before with these two IDEs. When a program (whatever it is) is compiled, it invariably leads to the same error showing :

__vector_16' referenced in section .vectors' of c:/appsportables/arduinoaug_0.70.04_exp/hardware/tools/avr/bin/../lib/gcc/avr/5.4.0/../../../../avr/lib/avr5/crtatmega328p.o: defined in discarded section `.text' of wiring.c.o (symbol from plugin)

c:/appsportables/arduinoaug_0.70.04_exp/hardware/tools/avr/bin/../lib/gcc/avr/5.4.0/../../../../avr/lib/avr5/crtatmega328p.o:(.init9+0x0): undefined reference to `main'

collect2.exe: error: ld returned 1 exit status

exit status 1
Erreur de compilation pour la carte [UNO]

It is not due to the program since the error is permanent whatever the program is (for example for any simple programs in the exemples, like "blink"). When the antivirus is turned down, the error disappears and the program is compiled. I tried many things with the anri-virus parameters but none of them worked : exclusions of different folders (installation directory, profile directory...) from real time scanning, allowing different exe files like arduino.exe, arduino-builder.exe, collect2.exe, ld.exe...

Does anyone has encountered this issue with this antivirus (or another) and managed to solve it? I'd appreciate any idea or help as I'm currently stucked...

There is a directory Arduino15 somewhere; for Windows, it's somewhere in ApoData (can't check now).

Exclude that directory from the AV.

Hello,
Thanks for the tip. the Arduino15 directory belongs to the C:\Users\%User%\AppData\Local directory which I had already excluded, but that didn't work.

Still, I tried to exclude also the Arduino15 directory (C:\Users\%User%\AppData\Local\Arduino15) explicitely, but it doesn't do anything either.

Does Apex One keep a log somewhere?

Can you post the verbose output of the compilation process (enable it in file → preferences)?

Apex One can keep logs but I'm not in charge of its maintenance in my organization. I couldn't find some pertinent log relative to the problem.

Actually I managed to find the parameter that was preventing arduino from achieving the last phase of the compiling process. It is in the surveillance of the behaviors parameter of the anti-virus. Although I had approved different programs there (collect2.exe, ld.exe, arduino.exe, avr-ld.exe, arduino-builder.exe...) it didn't worked out, I had to desactivate one option being "the inspection of programs in order to detect and block the compromised executable files".

The verbose of the compiling process is the following (for the program "blink" from the basics of examples) :

Arduino : 1.8.8 (Windows 10), Carte : "[UNO]"

C:\AppsPortables\ArduinoAug_0.70.04_EXP\arduino-builder -dump-prefs -logger=machine -hardware C:\AppsPortables\ArduinoAug_0.70.04_EXP\hardware -tools C:\AppsPortables\ArduinoAug_0.70.04_EXP\tools-builder -tools C:\AppsPortables\ArduinoAug_0.70.04_EXP\hardware\tools\avr -built-in-libraries C:\AppsPortables\ArduinoAug_0.70.04_EXP\libraries -libraries C:\Users\ordis.peda\Documents\Arduino\libraries -fqbn=arduino:avr:uno -ide-version=10808 -build-path C:\Users\ORDIS~1.PED\AppData\Local\Temp\arduino_build_495053 -warnings=all -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.arduinoOTA.path=C:\AppsPortables\ArduinoAug_0.70.04_EXP\hardware\tools\avr -prefs=runtime.tools.arduinoOTA-1.2.1.path=C:\AppsPortables\ArduinoAug_0.70.04_EXP\hardware\tools\avr -prefs=runtime.tools.avr-gcc.path=C:\AppsPortables\ArduinoAug_0.70.04_EXP\hardware\tools\avr -prefs=runtime.tools.avr-gcc-5.4.0-atmel3.6.1-arduino2.path=C:\AppsPortables\ArduinoAug_0.70.04_EXP\hardware\tools\avr -prefs=runtime.tools.avrdude.path=C:\AppsPortables\ArduinoAug_0.70.04_EXP\hardware\tools\avr -prefs=runtime.tools.avrdude-6.3.0-arduino14.path=C:\AppsPortables\ArduinoAug_0.70.04_EXP\hardware\tools\avr -verbose C:\AppsPortables\ArduinoAug_0.70.04_EXP\examples\01.Basics\Blink\Blink.ino
C:\AppsPortables\ArduinoAug_0.70.04_EXP\arduino-builder -compile -logger=machine -hardware C:\AppsPortables\ArduinoAug_0.70.04_EXP\hardware -tools C:\AppsPortables\ArduinoAug_0.70.04_EXP\tools-builder -tools C:\AppsPortables\ArduinoAug_0.70.04_EXP\hardware\tools\avr -built-in-libraries C:\AppsPortables\ArduinoAug_0.70.04_EXP\libraries -libraries C:\Users\ordis.peda\Documents\Arduino\libraries -fqbn=arduino:avr:uno -ide-version=10808 -build-path C:\Users\ORDIS~1.PED\AppData\Local\Temp\arduino_build_495053 -warnings=all -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.arduinoOTA.path=C:\AppsPortables\ArduinoAug_0.70.04_EXP\hardware\tools\avr -prefs=runtime.tools.arduinoOTA-1.2.1.path=C:\AppsPortables\ArduinoAug_0.70.04_EXP\hardware\tools\avr -prefs=runtime.tools.avr-gcc.path=C:\AppsPortables\ArduinoAug_0.70.04_EXP\hardware\tools\avr -prefs=runtime.tools.avr-gcc-5.4.0-atmel3.6.1-arduino2.path=C:\AppsPortables\ArduinoAug_0.70.04_EXP\hardware\tools\avr -prefs=runtime.tools.avrdude.path=C:\AppsPortables\ArduinoAug_0.70.04_EXP\hardware\tools\avr -prefs=runtime.tools.avrdude-6.3.0-arduino14.path=C:\AppsPortables\ArduinoAug_0.70.04_EXP\hardware\tools\avr -verbose C:\AppsPortables\ArduinoAug_0.70.04_EXP\examples\01.Basics\Blink\Blink.ino
Using board 'uno' from platform in folder: C:\AppsPortables\ArduinoAug_0.70.04_EXP\hardware\arduino\avr
Using core 'arduino' from platform in folder: C:\AppsPortables\ArduinoAug_0.70.04_EXP\hardware\arduino\avr
Detecting libraries used...
"C:\AppsPortables\ArduinoAug_0.70.04_EXP\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10808 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\AppsPortables\ArduinoAug_0.70.04_EXP\hardware\arduino\avr\cores\arduino" "-IC:\AppsPortables\ArduinoAug_0.70.04_EXP\hardware\arduino\avr\variants\standard" "C:\Users\ORDIS~1.PED\AppData\Local\Temp\arduino_build_495053\sketch\Blink.ino.cpp" -o nul
Generating function prototypes...
"C:\AppsPortables\ArduinoAug_0.70.04_EXP\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10808 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\AppsPortables\ArduinoAug_0.70.04_EXP\hardware\arduino\avr\cores\arduino" "-IC:\AppsPortables\ArduinoAug_0.70.04_EXP\hardware\arduino\avr\variants\standard" "C:\Users\ORDIS~1.PED\AppData\Local\Temp\arduino_build_495053\sketch\Blink.ino.cpp" -o "C:\Users\ORDIS~1.PED\AppData\Local\Temp\arduino_build_495053\preproc\ctags_target_for_gcc_minus_e.cpp"
"C:\AppsPortables\ArduinoAug_0.70.04_EXP\tools-builder\ctags\5.8-arduino11/ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "C:\Users\ORDIS~1.PED\AppData\Local\Temp\arduino_build_495053\preproc\ctags_target_for_gcc_minus_e.cpp"
Compilation du croquis...
"C:\AppsPortables\ArduinoAug_0.70.04_EXP\hardware\tools\avr/bin/avr-g++" -c -g -Os -Wall -Wextra -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10808 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\AppsPortables\ArduinoAug_0.70.04_EXP\hardware\arduino\avr\cores\arduino" "-IC:\AppsPortables\ArduinoAug_0.70.04_EXP\hardware\arduino\avr\variants\standard" "C:\Users\ORDIS~1.PED\AppData\Local\Temp\arduino_build_495053\sketch\Blink.ino.cpp" -o "C:\Users\ORDIS~1.PED\AppData\Local\Temp\arduino_build_495053\sketch\Blink.ino.cpp.o"
Compiling libraries...
Compiling core...
Utilisation du fichier déjà compilé : C:\Users\ORDIS~1.PED\AppData\Local\Temp\arduino_build_495053\core\wiring_pulse.S.o
Utilisation du fichier déjà compilé : C:\Users\ORDIS~1.PED\AppData\Local\Temp\arduino_build_495053\core\WInterrupts.c.o
Utilisation du fichier déjà compilé : C:\Users\ORDIS~1.PED\AppData\Local\Temp\arduino_build_495053\core\hooks.c.o
Utilisation du fichier déjà compilé : C:\Users\ORDIS~1.PED\AppData\Local\Temp\arduino_build_495053\core\wiring.c.o
Utilisation du fichier déjà compilé : C:\Users\ORDIS~1.PED\AppData\Local\Temp\arduino_build_495053\core\wiring_analog.c.o
Utilisation du fichier déjà compilé : C:\Users\ORDIS~1.PED\AppData\Local\Temp\arduino_build_495053\core\wiring_digital.c.o
Utilisation du fichier déjà compilé : C:\Users\ORDIS~1.PED\AppData\Local\Temp\arduino_build_495053\core\wiring_pulse.c.o
Utilisation du fichier déjà compilé : C:\Users\ORDIS~1.PED\AppData\Local\Temp\arduino_build_495053\core\wiring_shift.c.o
Utilisation du fichier déjà compilé : C:\Users\ORDIS~1.PED\AppData\Local\Temp\arduino_build_495053\core\CDC.cpp.o
Utilisation du fichier déjà compilé : C:\Users\ORDIS~1.PED\AppData\Local\Temp\arduino_build_495053\core\Stream.cpp.o
Utilisation du fichier déjà compilé : C:\Users\ORDIS~1.PED\AppData\Local\Temp\arduino_build_495053\core\HardwareSerial0.cpp.o
Utilisation du fichier déjà compilé : C:\Users\ORDIS~1.PED\AppData\Local\Temp\arduino_build_495053\core\HardwareSerial1.cpp.o
Utilisation du fichier déjà compilé : C:\Users\ORDIS~1.PED\AppData\Local\Temp\arduino_build_495053\core\HardwareSerial2.cpp.o
Utilisation du fichier déjà compilé : C:\Users\ORDIS~1.PED\AppData\Local\Temp\arduino_build_495053\core\HardwareSerial3.cpp.o
Utilisation du fichier déjà compilé : C:\Users\ORDIS~1.PED\AppData\Local\Temp\arduino_build_495053\core\IPAddress.cpp.o
Utilisation du fichier déjà compilé : C:\Users\ORDIS~1.PED\AppData\Local\Temp\arduino_build_495053\core\PluggableUSB.cpp.o
Utilisation du fichier déjà compilé : C:\Users\ORDIS~1.PED\AppData\Local\Temp\arduino_build_495053\core\Print.cpp.o
Utilisation du fichier déjà compilé : C:\Users\ORDIS~1.PED\AppData\Local\Temp\arduino_build_495053\core\WString.cpp.o
Utilisation du fichier déjà compilé : C:\Users\ORDIS~1.PED\AppData\Local\Temp\arduino_build_495053\core\Tone.cpp.o
Utilisation du fichier déjà compilé : C:\Users\ORDIS~1.PED\AppData\Local\Temp\arduino_build_495053\core\USBCore.cpp.o
Utilisation du fichier déjà compilé : C:\Users\ORDIS~1.PED\AppData\Local\Temp\arduino_build_495053\core\HardwareSerial.cpp.o
Utilisation du fichier déjà compilé : C:\Users\ORDIS~1.PED\AppData\Local\Temp\arduino_build_495053\core\main.cpp.o
Utilisation du fichier déjà compilé : C:\Users\ORDIS~1.PED\AppData\Local\Temp\arduino_build_495053\core\new.cpp.o
Utilisation du fichier déjà compilé : C:\Users\ORDIS~1.PED\AppData\Local\Temp\arduino_build_495053\core\WMath.cpp.o
Utilisation du fichier déjà compilé : C:\Users\ORDIS~1.PED\AppData\Local\Temp\arduino_build_495053\core\abi.cpp.o
Utilisation du fichier déjà compilé : C:\Users\ORDIS~1.PED\AppData\Local\Temp\arduino_build_495053\core\core.a
Linking everything together...
"C:\AppsPortables\ArduinoAug_0.70.04_EXP\hardware\tools\avr/bin/avr-gcc" -Wall -Wextra -Os -g -flto -fuse-linker-plugin -Wl,--gc-sections -mmcu=atmega328p -o "C:\Users\ORDIS~1.PED\AppData\Local\Temp\arduino_build_495053/Blink.ino.elf" "C:\Users\ORDIS~1.PED\AppData\Local\Temp\arduino_build_495053\sketch\Blink.ino.cpp.o" "C:\Users\ORDIS~1.PED\AppData\Local\Temp\arduino_build_495053/core\core.a" "-LC:\Users\ORDIS~1.PED\AppData\Local\Temp\arduino_build_495053" -lm
__vector_16' referenced in section .vectors' of c:/appsportables/arduinoaug_0.70.04_exp/hardware/tools/avr/bin/../lib/gcc/avr/5.4.0/../../../../avr/lib/avr5/crtatmega328p.o: defined in discarded section `.text' of wiring.c.o (symbol from plugin)

c:/appsportables/arduinoaug_0.70.04_exp/hardware/tools/avr/bin/../lib/gcc/avr/5.4.0/../../../../avr/lib/avr5/crtatmega328p.o:(.init9+0x0): undefined reference to `main'

collect2.exe: error: ld returned 1 exit status

exit status 1
Erreur de compilation pour la carte [UNO]

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.