Mosquitto with Cygwin - gcc

I want to run Mosquitto on Windows using Cygwin and I have installed Cygwin and downloaded Mosquitto as they describe on Mosquitto's site.
I have a simple example-file taken from mosquitto's site.
When I compile with this gcc-line:
gcc -Wall -o test test.c -I /home/Mathias/mosquitto-1.1.3/lib/ -L/home/Mathias/mosquitto-1.1.3/lib/ -lmosquitto
I get this error output:
/home/Mathias/mosquitto-1.1.3/lib//libmosquitto.a(mosquitto.o): In function `_mosquitto_destroy':
/home/Mathias/mosquitto-1.1.3/lib/mosquitto.c:285: undefined reference to `_SSL_free'
/home/Mathias/mosquitto-1.1.3/lib/mosquitto.c:288: undefined reference to `_SSL_CTX_free'
/home/Mathias/mosquitto-1.1.3/lib//libmosquitto.a(net_mosq.o): In function `psk_client_callback':
/home/Mathias/mosquitto-1.1.3/lib/net_mosq.c:201: undefined reference to `_SSL_get_ex_data'
/home/Mathias/mosquitto-1.1.3/lib//libmosquitto.a(net_mosq.o): In function `_mosquitto_net_init':
/home/Mathias/mosquitto-1.1.3/lib/net_mosq.c:94: undefined reference to `_SSL_load_error_strings'
/home/Mathias/mosquitto-1.1.3/lib/net_mosq.c:95: undefined reference to `_SSL_library_init'
/home/Mathias/mosquitto-1.1.3/lib/net_mosq.c:96: undefined reference to `_OPENSSL_add_all_algorithms_noconf'
/home/Mathias/mosquitto-1.1.3/lib/net_mosq.c:98: undefined reference to `_SSL_get_ex_new_index'
/home/Mathias/mosquitto-1.1.3/lib//libmosquitto.a(net_mosq.o): In function `_mosquitto_net_cleanup':
/home/Mathias/mosquitto-1.1.3/lib/net_mosq.c:106: undefined reference to `_ERR_free_strings'
/home/Mathias/mosquitto-1.1.3/lib//libmosquitto.a(net_mosq.o): In function `_mosquitto_socket_close':
/home/Mathias/mosquitto-1.1.3/lib/net_mosq.c:175: undefined reference to `_SSL_shutdown'
/home/Mathias/mosquitto-1.1.3/lib/net_mosq.c:176: undefined reference to `_SSL_free'
/home/Mathias/mosquitto-1.1.3/lib/net_mosq.c:180: undefined reference to `_SSL_CTX_free'
/home/Mathias/mosquitto-1.1.3/lib//libmosquitto.a(net_mosq.o): In function `_mosquitto_socket_connect':
/home/Mathias/mosquitto-1.1.3/lib/net_mosq.c:274: undefined reference to `_SSL_shutdown'
/home/Mathias/mosquitto-1.1.3/lib/net_mosq.c:275: undefined reference to `_SSL_free'
/home/Mathias/mosquitto-1.1.3/lib/net_mosq.c:279: undefined reference to `_SSL_CTX_free'
/home/Mathias/mosquitto-1.1.3/lib/net_mosq.c:308: undefined reference to `_TLSv1_client_method'
/home/Mathias/mosquitto-1.1.3/lib/net_mosq.c:308: undefined reference to `_SSL_CTX_new'
/home/Mathias/mosquitto-1.1.3/lib/net_mosq.c:321: undefined reference to `_SSL_CTX_ctrl'
/home/Mathias/mosquitto-1.1.3/lib/net_mosq.c:325: undefined reference to `_SSL_CTX_ctrl'
/home/Mathias/mosquitto-1.1.3/lib/net_mosq.c:329: undefined reference to `_SSL_CTX_set_cipher_list'
/home/Mathias/mosquitto-1.1.3/lib/net_mosq.c:337: undefined reference to `_SSL_CTX_load_verify_locations'
/home/Mathias/mosquitto-1.1.3/lib/net_mosq.c:360: undefined reference to `_SSL_CTX_set_verify'
/home/Mathias/mosquitto-1.1.3/lib/net_mosq.c:366: undefined reference to `_SSL_CTX_set_default_passwd_cb'
/home/Mathias/mosquitto-1.1.3/lib/net_mosq.c:367: undefined reference to `_SSL_CTX_set_default_passwd_cb_userdata'
/home/Mathias/mosquitto-1.1.3/lib/net_mosq.c:371: undefined reference to `_SSL_CTX_use_certificate_file'
/home/Mathias/mosquitto-1.1.3/lib/net_mosq.c:402: undefined reference to `_SSL_CTX_set_psk_client_callback'
/home/Mathias/mosquitto-1.1.3/lib/net_mosq.c:406: undefined reference to `_SSL_new'
/home/Mathias/mosquitto-1.1.3/lib/net_mosq.c:411: undefined reference to `_SSL_set_ex_data'
/home/Mathias/mosquitto-1.1.3/lib/net_mosq.c:412: undefined reference to `_BIO_new_socket'
/home/Mathias/mosquitto-1.1.3/lib/net_mosq.c:417: undefined reference to `_SSL_set_bio'
/home/Mathias/mosquitto-1.1.3/lib/net_mosq.c:419: undefined reference to `_SSL_connect'
/home/Mathias/mosquitto-1.1.3/lib/net_mosq.c:421: undefined reference to `_SSL_get_error'
/home/Mathias/mosquitto-1.1.3/lib/net_mosq.c:362: undefined reference to `_SSL_CTX_set_verify'
/home/Mathias/mosquitto-1.1.3/lib/net_mosq.c:383: undefined reference to `_SSL_CTX_use_PrivateKey_file'
/home/Mathias/mosquitto-1.1.3/lib/net_mosq.c:393: undefined reference to `_SSL_CTX_check_private_key'
/home/Mathias/mosquitto-1.1.3/lib//libmosquitto.a(net_mosq.o): In function `_mosquitto_net_read':
/home/Mathias/mosquitto-1.1.3/lib/net_mosq.c:543: undefined reference to `_SSL_read'
/home/Mathias/mosquitto-1.1.3/lib/net_mosq.c:545: undefined reference to `_SSL_get_error'
/home/Mathias/mosquitto-1.1.3/lib/net_mosq.c:555: undefined reference to `_ERR_get_error'
/home/Mathias/mosquitto-1.1.3/lib/net_mosq.c:557: undefined reference to `_ERR_error_string'
/home/Mathias/mosquitto-1.1.3/lib/net_mosq.c:558: undefined reference to `_ERR_get_error'
/home/Mathias/mosquitto-1.1.3/lib//libmosquitto.a(net_mosq.o): In function `_mosquitto_net_write':
/home/Mathias/mosquitto-1.1.3/lib/net_mosq.c:593: undefined reference to `_SSL_write'
/home/Mathias/mosquitto-1.1.3/lib/net_mosq.c:595: undefined reference to `_SSL_get_error'
/home/Mathias/mosquitto-1.1.3/lib/net_mosq.c:605: undefined reference to `_ERR_get_error'
/home/Mathias/mosquitto-1.1.3/lib/net_mosq.c:607: undefined reference to `_ERR_error_string'
/home/Mathias/mosquitto-1.1.3/lib/net_mosq.c:608: undefined reference to `_ERR_get_error'
/home/Mathias/mosquitto-1.1.3/lib//libmosquitto.a(net_mosq.o): In function `_mosquitto_net_cleanup':
/home/Mathias/mosquitto-1.1.3/lib/net_mosq.c:107: undefined reference to `_EVP_cleanup'
/home/Mathias/mosquitto-1.1.3/lib//libmosquitto.a(util_mosq.o): In function `_mosquitto_hex2bin':
/home/Mathias/mosquitto-1.1.3/lib/util_mosq.c:309: undefined reference to `_BN_hex2bn'
/home/Mathias/mosquitto-1.1.3/lib/util_mosq.c:319: undefined reference to `_BN_free'
/home/Mathias/mosquitto-1.1.3/lib/util_mosq.c:313: undefined reference to `_BN_num_bits'
/home/Mathias/mosquitto-1.1.3/lib/util_mosq.c:318: undefined reference to `_BN_bn2bin'
/home/Mathias/mosquitto-1.1.3/lib/util_mosq.c:314: undefined reference to `_BN_free'
collect2: ld returned 1 exit status
I dont know how top go from here...
Appreciate any kind of help!

Given that the error messages are SSL related, it looks like SSL wasn't installed in cygwin.
Rerun setup.exe and answer the prompts to get back to the Select Packages screen.
Enter in SSL into the Search box
Open up the Libs section and select the libraries you need.
Alternatively, you could install the entire openssl package from the Net section and let cygwin install all required dependencies.

I solved the SSL errors by adding -lsslto the gcc line.
Final gcc line:
$ gcc -Wall -Imosquitto-1.1.3/lib/ -Lmosquitto-1.1.3/lib/ -lssl -lmosquitto -o test test.c mosquitto-1.1.3/lib/libmosquitto.so.1
When solved this, another problem occured when running the application, which I have asked another question about: https://stackoverflow.com/questions/16517320/running-mosquitto-on-windows-using-cygwin

Related

LUFA with Eclipse but without Makefile

I want to use LUFA for my ATMEGA32U4 to communicate via CDC. So to start I created a project in Eclipse and imported the LUFA folder and the files for the Device VirtualSerial demo. The thing is, that I want to do that without using the makefile (mostly because I have never used makefiles before). Is that possible and what do I need to do? I have tried a lot, but I get errors all the time. Is there any instruction?
Thanks!
Sebastian
P.S.: Just to be clear. I want to use the "Managed Builder", so that I don´t have to do anything with the makefile, but Eclipse does that for me.
P.P.S.: I also tried http://www.fourwalledcubicle.com/files/LUFA/Doc/140928/html/_page__exporting_library.html
with AS7 and Eclipse, but it didn´t work with both.....
P.P.S.: When I try to build the project I get the error
'Building target: Test1.elf'
'Invoking: AVR C Linker'
avr-gcc -Wl,-Map,Test1.map -mmcu=atmega32u4 -o "Test1.elf" ./LUFA/Platform/UC3/Exception.o ./LUFA/Platform/UC3/InterruptManagement.o ./LUFA/Drivers/USB/Core/XMEGA/Template/Template_Endpoint_Control_R.o ./LUFA/Drivers/USB/Core/XMEGA/Template/Template_Endpoint_Control_W.o ./LUFA/Drivers/USB/Core/XMEGA/Template/Template_Endpoint_RW.o ./LUFA/Drivers/USB/Core/XMEGA/Device_XMEGA.o ./LUFA/Drivers/USB/Core/XMEGA/EndpointStream_XMEGA.o ./LUFA/Drivers/USB/Core/XMEGA/Endpoint_XMEGA.o ./LUFA/Drivers/USB/Core/XMEGA/Host_XMEGA.o ./LUFA/Drivers/USB/Core/XMEGA/PipeStream_XMEGA.o ./LUFA/Drivers/USB/Core/XMEGA/Pipe_XMEGA.o ./LUFA/Drivers/USB/Core/XMEGA/USBController_XMEGA.o ./LUFA/Drivers/USB/Core/XMEGA/USBInterrupt_XMEGA.o ./LUFA/Drivers/USB/Core/UC3/Template/Template_Endpoint_Control_R.o ./LUFA/Drivers/USB/Core/UC3/Template/Template_Endpoint_Control_W.o ./LUFA/Drivers/USB/Core/UC3/Template/Template_Endpoint_RW.o ./LUFA/Drivers/USB/Core/UC3/Template/Template_Pipe_RW.o ./LUFA/Drivers/USB/Core/UC3/Device_UC3.o ./LUFA/Drivers/USB/Core/UC3/EndpointStream_UC3.o ./LUFA/Drivers/USB/Core/UC3/Endpoint_UC3.o ./LUFA/Drivers/USB/Core/UC3/Host_UC3.o ./LUFA/Drivers/USB/Core/UC3/PipeStream_UC3.o ./LUFA/Drivers/USB/Core/UC3/Pipe_UC3.o ./LUFA/Drivers/USB/Core/UC3/USBController_UC3.o ./LUFA/Drivers/USB/Core/UC3/USBInterrupt_UC3.o ./LUFA/Drivers/USB/Core/AVR8/Template/Template_Endpoint_Control_R.o ./LUFA/Drivers/USB/Core/AVR8/Template/Template_Endpoint_Control_W.o ./LUFA/Drivers/USB/Core/AVR8/Template/Template_Endpoint_RW.o ./LUFA/Drivers/USB/Core/AVR8/Template/Template_Pipe_RW.o ./LUFA/Drivers/USB/Core/AVR8/Device_AVR8.o ./LUFA/Drivers/USB/Core/AVR8/EndpointStream_AVR8.o ./LUFA/Drivers/USB/Core/AVR8/Endpoint_AVR8.o ./LUFA/Drivers/USB/Core/AVR8/Host_AVR8.o ./LUFA/Drivers/USB/Core/AVR8/PipeStream_AVR8.o ./LUFA/Drivers/USB/Core/AVR8/Pipe_AVR8.o ./LUFA/Drivers/USB/Core/AVR8/USBController_AVR8.o ./LUFA/Drivers/USB/Core/AVR8/USBInterrupt_AVR8.o ./LUFA/Drivers/USB/Core/ConfigDescriptors.o ./LUFA/Drivers/USB/Core/DeviceStandardReq.o ./LUFA/Drivers/USB/Core/Events.o ./LUFA/Drivers/USB/Core/HostStandardReq.o ./LUFA/Drivers/USB/Core/USBTask.o ./LUFA/Drivers/USB/Class/Host/AndroidAccessoryClassHost.o ./LUFA/Drivers/USB/Class/Host/AudioClassHost.o ./LUFA/Drivers/USB/Class/Host/CDCClassHost.o ./LUFA/Drivers/USB/Class/Host/HIDClassHost.o ./LUFA/Drivers/USB/Class/Host/MIDIClassHost.o ./LUFA/Drivers/USB/Class/Host/MassStorageClassHost.o ./LUFA/Drivers/USB/Class/Host/PrinterClassHost.o ./LUFA/Drivers/USB/Class/Host/RNDISClassHost.o ./LUFA/Drivers/USB/Class/Host/StillImageClassHost.o ./LUFA/Drivers/USB/Class/Device/AudioClassDevice.o ./LUFA/Drivers/USB/Class/Device/CDCClassDevice.o ./LUFA/Drivers/USB/Class/Device/HIDClassDevice.o ./LUFA/Drivers/USB/Class/Device/MIDIClassDevice.o ./LUFA/Drivers/USB/Class/Device/MassStorageClassDevice.o ./LUFA/Drivers/USB/Class/Device/PrinterClassDevice.o ./LUFA/Drivers/USB/Class/Device/RNDISClassDevice.o ./LUFA/Drivers/USB/Class/Common/HIDParser.o ./LUFA/Drivers/Peripheral/XMEGA/Serial_XMEGA.o ./LUFA/Drivers/Peripheral/XMEGA/TWI_XMEGA.o ./LUFA/Drivers/Peripheral/AVR8/Serial_AVR8.o ./LUFA/Drivers/Peripheral/AVR8/TWI_AVR8.o ./LUFA/Drivers/Board/Temperature.o ./LUFA/Build/DMBS/Template/Template.o ./LUFA/Build/DMBS/DMBS/HID_EEPROM_Loader/HID_EEPROM_Loader.o ./Descriptors.o ./VirtualSerial.o
./LUFA/Build/DMBS/DMBS/HID_EEPROM_Loader/HID_EEPROM_Loader.o: In function main':
HID_EEPROM_Loader.c:(.text.startup.main+0x0): multiple definition ofmain'
./LUFA/Build/DMBS/Template/Template.o:Template.c:(.text.startup.main+0x0): first defined here
./VirtualSerial.o: In function main':
VirtualSerial.c:(.text.startup.main+0x0): multiple definition ofmain'
./LUFA/Build/DMBS/Template/Template.o:Template.c:(.text.startup.main+0x0): first defined here
./LUFA/Drivers/USB/Class/Device/AudioClassDevice.o: In function Audio_Device_ProcessControlRequest':
AudioClassDevice.c:(.text.Audio_Device_ProcessControlRequest+0xf8): undefined reference toCALLBACK_Audio_Device_GetSetEndpointProperty'
AudioClassDevice.c:(.text.Audio_Device_ProcessControlRequest+0x15a): undefined reference to CALLBACK_Audio_Device_GetSetEndpointProperty'
AudioClassDevice.c:(.text.Audio_Device_ProcessControlRequest+0x182): undefined reference toCALLBACK_Audio_Device_GetSetInterfaceProperty'
AudioClassDevice.c:(.text.Audio_Device_ProcessControlRequest+0x1e4): undefined reference to CALLBACK_Audio_Device_GetSetInterfaceProperty'
AudioClassDevice.c:(.text.Audio_Device_ProcessControlRequest+0x236): undefined reference toCALLBACK_Audio_Device_GetSetEndpointProperty'
AudioClassDevice.c:(.text.Audio_Device_ProcessControlRequest+0x284): undefined reference to CALLBACK_Audio_Device_GetSetInterfaceProperty'
./LUFA/Drivers/USB/Class/Device/HIDClassDevice.o: In functionHID_Device_ProcessControlRequest':
HIDClassDevice.c:(.text.HID_Device_ProcessControlRequest+0xd0): undefined reference to CALLBACK_HID_Device_CreateHIDReport'
HIDClassDevice.c:(.text.HID_Device_ProcessControlRequest+0x18e): undefined reference toCALLBACK_HID_Device_ProcessHIDReport'
./LUFA/Drivers/USB/Class/Device/HIDClassDevice.o: In function HID_Device_USBTask':
HIDClassDevice.c:(.text.HID_Device_USBTask+0xa2): undefined reference toCALLBACK_HID_Device_CreateHIDReport'
./LUFA/Drivers/USB/Class/Device/MassStorageClassDevice.o: In function MS_Device_USBTask':
MassStorageClassDevice.c:(.text.MS_Device_USBTask+0xf4): undefined reference toCALLBACK_MS_Device_SCSICommandReceived'
./LUFA/Drivers/USB/Class/Common/HIDParser.o: In function USB_ProcessHIDReport':
HIDParser.c:(.text.USB_ProcessHIDReport+0x5bc): undefined reference toCALLBACK_HIDParser_FilterHIDReportItem'
./LUFA/Build/DMBS/DMBS/HID_EEPROM_Loader/HID_EEPROM_Loader.o: In function main':
HID_EEPROM_Loader.c:(.text.startup.main+0x4): undefined reference to_binary_InputEEData_bin_size'
HID_EEPROM_Loader.c:(.text.startup.main+0x6): undefined reference to _binary_InputEEData_bin_size'
HID_EEPROM_Loader.c:(.text.startup.main+0xe): undefined reference to_binary_InputEEData_bin_start'
HID_EEPROM_Loader.c:(.text.startup.main+0x10): undefined reference to `_binary_InputEEData_bin_start'
collect2.exe: error: ld returned 1 exit status
make: *** [Test1.elf] Error 1
"make all" terminated with exit code 2. Build might be incomplete.
Solved it!
There were a lot of c-files, that were unnecessary, but eclipse wanted to compile them anyway. I excluded them and now it´s working.

geoCouch install: compiling failed

I have trouble with including geoCouch to running couchDB (1.6.1).
I followed the Instruction: https://github.com/couchbase/geocouch/#for-apache-couchdb
In the GeoCouch directory ($HOME/geocouch) I tried to compile:
COUCH_SRC=$HOME/apache-couchdb-1.6.1/src/couchdb make couchdb
and get the message:
/rebar -C rebar_couchdb.config compile
==> vtree (compile)
Compiling /home/ec2-user/geocouch/vtree/src/vtree_cleanup.erl failed:
/home/ec2-user/geocouch/vtree/src/vtree_cleanup.erl:16: can't find include file "couch_db.hrl"
/home/ec2-user/geocouch/vtree/src/vtree_cleanup.erl:41: undefined macro 'LOG_DEBUG/2'
/home/ec2-user/geocouch/vtree/src/vtree_cleanup.erl:18: function cleanup/2 undefined
/home/ec2-user/geocouch/vtree/src/vtree_cleanup.erl:26: spec for undefined function vtree_cleanup:cleanup/2
/home/ec2-user/geocouch/vtree/src/vtree_cleanup.erl:47: function cleanup_multiple/3 is unused
/home/ec2-user/geocouch/vtree/src/vtree_cleanup.erl:54: function cleanup_nodes/2 is unused
/home/ec2-user/geocouch/vtree/src/vtree_cleanup.erl:62: function member_of_nodes/2 is unused
/home/ec2-user/geocouch/vtree/src/vtree_cleanup.erl:75: function partition_nodes/3 is unused
"couch_db.hrl" is located in /home/ec2-user/apache-couchdb-1.6.1/src/couchdb
Does anyone know how to fix that? Help/idea?

Can't compile Arduino CapSense example

I'm trying to work with the CapSense library for Arduino. However, I can't manage to run the example included with the package, called "CapSenseSketch". When I try just opening the file and running it (I've tried both Arduino 1.0 and 1.0.1), I get a compiler error that says 'CapSense does not name a type", and also
CapSenseSketch.cpp:1:22: error: CapSense.h: No such file or directory
CapSenseSketch:11: error: 'CapSense' does not name a type
CapSenseSketch:12: error: 'CapSense' does not name a type
CapSenseSketch:13: error: 'CapSense' does not name a type
CapSenseSketch.cpp: In function 'void setup()':
CapSenseSketch:17: error: 'cs_4_2' was not declared in this scope
CapSenseSketch.cpp: In function 'void loop()':
CapSenseSketch:24: error: 'cs_4_2' was not declared in this scope
CapSenseSketch:25: error: 'cs_4_6' was not declared in this scope
CapSenseSketch:26: error: 'cs_4_8' was not declared in this scope
There is an include statement at the top of the code,
#include <CapSense.h>
and I thought that would be the problem, so I changed the brackets to quotes and still got an error saying "Error compiling" and:
CapSenseSketch.cpp.o: In function `__static_initialization_and_destruction_0':
CapSenseSketch.cpp:15: undefined reference to `CapSense::CapSense(unsigned char, unsigned char)'
CapSenseSketch.cpp:16: undefined reference to `CapSense::CapSense(unsigned char, unsigned char)'
CapSenseSketch.cpp:17: undefined reference to `CapSense::CapSense(unsigned char, unsigned char)'
CapSenseSketch.cpp.o: In function `loop':
CapSenseSketch.cpp:28: undefined reference to `CapSense::capSense(unsigned char)'
CapSenseSketch.cpp:29: undefined reference to `CapSense::capSense(unsigned char)'
CapSenseSketch.cpp:30: undefined reference to `CapSense::capSense(unsigned char)'
CapSenseSketch.cpp.o: In function `setup':
CapSenseSketch.cpp:21: undefined reference to `CapSense::set_CS_AutocaL_Millis(unsigned long)'
Any ideas? I've worked with CapSense on another computer and changing the brackets to quotes worked fine that time, but it doesn't seem to be doing much now.
Apparently including external files works a bit differently in the arduino ide. It's not enough to simply have an include statement at the top of your code, you must instead manually go to sketch > add file for every external file you want to use. In my case, I only did this for one out of the two files I was trying to use.

How to solve libx264 not found when building ffmpeg-with-libx264-enabled for android?

i am trying build android-ffmpeg-x264 downloaded from git. Link https://github.com/halfninja/android-ffmpeg-x264
After running ./config_make_everything.sh i am getting following error
ERROR: libx264 not found
If you think configure made a mistake, make sure you are using the latest
version from Git. If the latest version fails, report the problem to the
ffmpeg-user#ffmpeg.org mailing list or IRC #ffmpeg on irc.freenode.net.
Include the log file "config.log" produced by configure as this will help
solving the problem.
<pre>
Makefile:1: config.mak: No such file or directory
libavutil/Makefile:1: libavutil/../config.mak: No such file or directory
libavutil/../subdir.mak:96: warning: overriding commands for target `libavutil/'
libavutil/../subdir.mak:26: warning: ignoring old commands for target `libavutil/'
libavutil/../subdir.mak:96: warning: overriding commands for target `libavutil/'
libavutil/../subdir.mak:96: warning: ignoring old commands for target `libavutil/'
tests/Makefile:44: /tests/fate.mak: No such file or directory
tests/Makefile:45: /tests/fate2.mak: No such file or directory
tests/Makefile:47: /tests/fate/aac.mak: No such file or directory
tests/Makefile:48: /tests/fate/als.mak: No such file or directory
tests/Makefile:49: /tests/fate/fft.mak: No such file or directory
tests/Makefile:50: /tests/fate/h264.mak: No such file or directory
tests/Makefile:51: /tests/fate/mp3.mak: No such file or directory
tests/Makefile:52: /tests/fate/vorbis.mak: No such file or directory
tests/Makefile:53: /tests/fate/vp8.mak: No such file or directory
make: *** No rule to make target `/tests/fate/vp8.mak'. Stop.
</pre>
config.log contains
<pre>
ratecontrol.c:(.text+0xa400): undefined reference to `memset'
ratecontrol.c:(.text+0xa41c): undefined reference to `memset'
ratecontrol.c:(.text+0xa448): undefined reference to `__aeabi_l2d'
ratecontrol.c:(.text+0xa49c): undefined reference to `__aeabi_ldivmod'
ratecontrol.c:(.text+0xa4a0): undefined reference to `__aeabi_l2d'
ratecontrol.c:(.text+0xa4f8): undefined reference to `__aeabi_idivmod'
ratecontrol.c:(.text+0xa794): undefined reference to `__aeabi_l2d'
../x264/libx264.a(set.o): In function `x264_validate_levels':
set.c:(.text+0x200): undefined reference to `__aeabi_ldivmod'
set.c:(.text+0x334): undefined reference to `__aeabi_idiv'
../x264/libx264.a(set.o): In function `x264_sei_version_write':
set.c:(.text+0xeec): undefined reference to `strlen'
set.c:(.text+0xf10): undefined reference to `memcpy'
set.c:(.text+0xf3c): undefined reference to `sprintf'
set.c:(.text+0xf44): undefined reference to `strlen'
../x264/libx264.a(set.o): In function `scaling_list_write':
set.c:(.text+0x20b0): undefined reference to `memcmp'
set.c:(.text+0x2138): undefined reference to `memcmp'
set.c:(.text+0x2158): undefined reference to `memcmp'
../x264/libx264.a(set.o): In function `x264_pps_write':
set.c:(.text+0x5870): undefined reference to `memcmp'
set.c:(.text+0x5a7c): undefined reference to `memcmp'
../x264/libx264.a(set.o):set.c:(.text+0x5a9c): more undefined references to `memcmp' follow
../x264/libx264.a(macroblock.o): In function `x264_noise_reduction_update':
macroblock.c:(.text+0xe10): undefined reference to `__aeabi_uldivmod'
../x264/libx264.a(macroblock.o): In function `x264_predict_lossless_8x8_chroma':
macroblock.c:(.text+0x3224): undefined reference to `memcpy'
macroblock.c:(.text+0x323c): undefined reference to `memcpy'
../x264/libx264.a(cabac.o): In function `x264_macroblock_write_cabac':
cabac.c:(.text+0x2c58): undefined reference to `__assert2'
cabac.c:(.text+0x2dd8): undefined reference to `__assert2'
cabac.c:(.text+0x2f80): undefined reference to `__assert2'
cabac.c:(.text+0x3020): undefined reference to `__assert2'
../x264/libx264.a(rectangle.o): In function `x264_macroblock_cache_ref_1_1':
rectangle.c:(.text+0x1e4): undefined reference to `__assert2'
../x264/libx264.a(rectangle.o):rectangle.c:(.text+0x210): more undefined references to `__assert2' follow
ERROR: libx264 not found
</pre>
1.I am using fedora to build both ffmpeg and x264
2.NDK r7
Any solution to successfully build the code?
I have not yet confirmed this personally but I believe you can solve this if you downgrade the NDK to r5c. Remember to recreate the toolchain.

Xcode linker and blocks: Undefined symbol "___block_global_1"

I am trying to build an application in Xcode 3.2.4 and am getting the following linker error:
Undefined symbols:
"___block_global_1", referenced from:
___block_holder_tmp_1.120 in foobarbaz.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
I'm at a loss to explain what I've done in my source file that might be causing the error. I do have a block that I am defining as a global variable, like so:
typedef void(^error_block_t)(NSError* error);
error_block_t error_handler_s = ^void(NSError* error)
{
//...
}
This block is defined in an empty namespace in the source (I'm compiling Objective-C++.) Everything compiles without error.
Update: Moving the block to be a local variable for the routine that references it is a viable (though not preferred) workaround.
What gives?
If the error_handler_s is not intended to be exported, you could make it static as another workaround.
namespace {
...
static error_block_t error_handler_s = ^void(NSError* error) { ... };
...
}
Otherwise, I believe this is a bug in gcc.
At this point I believe this issue to be a bug.

Resources