Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [paho-dev] Build problem Eclipse PAHO C Client

I must be using an older version, but from looking at the current one, yes, you can just import these two libraries without renaming them, the names I gave are what older version of the script used to output.

Al

On 01/10/14 14:27, Guy Dillen wrote:
Hi Al,

When running the script as superuser (sudo ./build.sh) it generates indeed
2 files in the ‘lib' directory: “libcrypto.a" and “libssl.a" but not
“libcrypto_iOS.a" and
“libssl_iOS.a”. When looking at the shell script it apparently only
generates “libcrypto.a" and “libssl.a” files. Should I rename these files
to libcrypto_iOS.a” and “libssl_iOS.a”?

Thanks
Guy


On 01/10/14 11:35, "Guy Dillen" <guy.dillen@xxxxxxxxx> wrote:

include and lib folders in the directory where build.sh are empty. The
script only generated output in /tmp. Can this due to the fact I’m trying
to build against IOS 8.0?

Thanks.
Guy

On 01/10/14 11:16, "Al Stockdill-Mander" <asm@xxxxxxxx> wrote

The directory where you ran the script it should have created a
directory called lib inside which you should see a libcrypto_iOS.a and
libssl_iOS.a that is a fat binary library for all iOS devices including
the simulator, these two files should be added to your project.
in that same directory should be a folder called include, you can either
add the this or the openssl directory inside it to your project, make
sure to configure your include path for your project to point to the
correct place, it should be the directory where the openssl directory is
as the #includes in the C client are for openssl/<file>

Al

On 01/10/14 09:15, Guy Dillen wrote:
Hi Al,

I downloaded the build script (the link in your mail). I modified the
script to the latest OpenSsl version (1.0.li) and to SDK_VERSION=“8.0”
(I
recently upgraded to 8.0).

The script obviously runs without problems. I get the output of running
the script in my /tmp directory. I see 2 directories having ‘armv7':
‘armv7' and ‘armv7s'.
- 1. Which one do I need to add to my project?
- 2. Do I need to copy the whole ./include/openssl directory to my
project?
- 3. In my project I suppose I only need to create an ‘openssl’
directory
with the contents of above?

Thanks.
Guy


On 30/09/14 17:26, "Al Stockdill-Mander" <asm@xxxxxxxx> wrote:

If you don't have a built copy of OpenSSL just remove the -DOPENSSL
and
it won't try to compile in SSL support.

If you want to include SSL support as well you a script like the one
at
https://github.com/st3fan/ios-openssl would build you iOS device and
emulator versions. Copy in the include directory that it also builds
into the project with the MQTT C client source code.
You will need to edit the script in the project I linked to build the
latest copy of OpenSSL (just to change the embedded version number it
looks for)

Al

On 30/09/14 16:15, Guy Dillen wrote:
Or should I just download the latest source code from
https://www.openssl.org/source/ and add this to my project?

Thx.

On 30/09/14 17:10, "Guy Dillen" <guy.dillen@xxxxxxxxx> wrote:

Hi Al,

I found where to put the flags “Other C Flags” Debug and Release.
Now I only get some warnings and an error on openssl/ssl.h. Where
should I
get this ssl.h .. file?

Thanks.
Guy

org.eclipse.paho.mqtt.c-1.0.1/src/utf-8.c
org.eclipse.paho.mqtt.c-1.0.1/src/utf-8.c:156:21: Implicit
conversion
loses integer precision: 'unsigned long' to 'int'
org.eclipse.paho.mqtt.c-1.0.1/src/Thread.c
org.eclipse.paho.mqtt.c-1.0.1/src/Thread.c:213:29: 'tempnam' is
deprecated: This function is provided for compatibility reasons
only.
Due
to security concerns inherent in the design of tempnam(3), it is
highly
recommended that you use mkstemp(3) instead.
org.eclipse.paho.mqtt.c-1.0.1/src/Thread.c:300:2: 'sem_getvalue' is
deprecated
org.eclipse.paho.mqtt.c-1.0.1/src/SSLSocket.h
org.eclipse.paho.mqtt.c-1.0.1/src/SSLSocket.h:27:10: 'openssl/ssl.h'
file
not found
org.eclipse.paho.mqtt.c-1.0.1/src/SocketBuffer.h
org.eclipse.paho.mqtt.c-1.0.1/src/SocketBuffer.h:28:10:
'openssl/ssl.h'
file not found



On 30/09/14 16:42, "Guy Dillen" <guy.dillen@xxxxxxxxx> wrote:

Hi Al,

I’m not that experimented with Xcode: to build the client should I
put
these flags (-DOPENSSL -DNOSIGPIPE
-DUSE_NAMED_SEMAPHORES) in the section “Linking” -> "Other Linker
Flags"
of my Xcode project?

Thanks.
Guy

On 30/09/14 14:45, "Al Stockdill-Mander" <asm@xxxxxxxx> wrote:

I'm building the C client in XCode here (v5.1.1 with iOS 7 rather
than
8). I have OpenSSL compiled for iOS and with -DOPENSSL -DNOSIGPIPE
-DUSE_NAMED_SEMAPHORES I get the deprecation and value conversion
warnings but no errors.

Al

On 30/09/14 12:22, Guy Dillen wrote:
Hi Ian,

Thanks.

there's a section in the Makefile for OS/X builds, which builds
without any warnings for OS/X, at least on my system.   The
compiler
options are:

CCFLAGS_SO = -g -fPIC -Os -Wall -fvisibility=hidden
-Wno-deprecated-declarations -DUSE_NAMED_SEMAPHORES

Do these also work for IOS, since I'm trying to build for IOS 8.

Thanks.
Guy




Sent from my iPad

On 30 Sep 2014, at 11:55, Ian Craggs
<icraggs@xxxxxxxxxxxxxxxxxxxxxxx
<mailto:icraggs@xxxxxxxxxxxxxxxxxxxxxxx>> wrote:

Hi Guy,

there's a section in the Makefile for OS/X builds, which builds
without any warnings for OS/X, at least on my system.   The
compiler
options are:

CCFLAGS_SO = -g -fPIC -Os -Wall -fvisibility=hidden
-Wno-deprecated-declarations -DUSE_NAMED_SEMAPHORES

I realize that one of the options is
-Wno-deprecated-declarations
--
which I don't remember adding myself, maybe it was Al or Andy --
so
at
some point I should look to changing those semaphore calls for
the
Mac.

Ian


On 09/29/2014 06:06 PM, Guy Dillen wrote:
Hi,

I’m trying to build (in Xcode) the C client
http://git.eclipse.org/c/paho/org.eclipse.paho.mqtt.c.git/ for
IOS
8.
    I added all *.h/*.c files under the ‘src’ folder. I get the
following warnings / errors when building:

iPad2 build

Warnings
org.eclipse.paho.mqtt.c-1.0.1/src/MQTTAsync.c
org.eclipse.paho.mqtt.c-1.0.1/src/MQTTAsync.c:1234:9: Code will
never
be executed
org.eclipse.paho.mqtt.c-1.0.1/src/Thread.c
org.eclipse.paho.mqtt.c-1.0.1/src/Thread.c:233:8: 'sem_init' is
deprecated
org.eclipse.paho.mqtt.c-1.0.1/src/Thread.c:300:2:
'sem_getvalue'
is
deprecated
org.eclipse.paho.mqtt.c-1.0.1/src/Thread.c:354:8: 'sem_destroy'
is
deprecated
org.eclipse.paho.mqtt.c-1.0.1/src/MQTTPersistenceDefault.c

org.eclipse.paho.mqtt.c-1.0.1/src/MQTTPersistenceDefault.c:257:3
:
Code will never be executed

Errors
org.eclipse.paho.mqtt.c-1.0.1/src/Heap.c
org.eclipse.paho.mqtt.c-1.0.1/src/Heap.c:77:21: Too few
arguments
provided to function-like macro invocation
org.eclipse.paho.mqtt.c-1.0.1/src/Heap.c:77:12: Expected ';'
after
top level declarator
org.eclipse.paho.mqtt.c-1.0.1/src/Heap.c:145:21: Too few
arguments
provided to function-like macro invocation
org.eclipse.paho.mqtt.c-1.0.1/src/Heap.c:288:22: Too few
arguments
provided to function-like macro invocation

iPhone5S build
Warnings
￿org.eclipse.paho.mqtt.c-1.0.1/src/MQTTAsync.c
￿org.eclipse.paho.mqtt.c-1.0.1/src/MQTTAsync.c:304:21: Implicit
conversion loses integer precision: 'long' to 'useconds_t' (aka
'unsigned int')
￿org.eclipse.paho.mqtt.c-1.0.1/src/MQTTAsync.c:506:63: Implicit
conversion loses integer precision: 'unsigned long' to 'int'
￿org.eclipse.paho.mqtt.c-1.0.1/src/MQTTAsync.c:531:65: Implicit
conversion loses integer precision: 'unsigned long' to 'int'
￿org.eclipse.paho.mqtt.c-1.0.1/src/MQTTAsync.c:549:68: Implicit
conversion loses integer precision: 'unsigned long' to 'int'
￿org.eclipse.paho.mqtt.c-1.0.1/src/MQTTAsync.c:607:29: Implicit
conversion loses integer precision: 'unsigned long' to 'int'
￿org.eclipse.paho.mqtt.c-1.0.1/src/MQTTAsync.c:624:33: Implicit
conversion loses integer precision: 'unsigned long' to 'int'
￿org.eclipse.paho.mqtt.c-1.0.1/src/MQTTAsync.c:633:28: Implicit
conversion loses integer precision: 'unsigned long' to 'int'
￿org.eclipse.paho.mqtt.c-1.0.1/src/MQTTAsync.c:1048:63:
Implicit
conversion loses integer precision: 'unsigned long' to 'int'
￿org.eclipse.paho.mqtt.c-1.0.1/src/MQTTAsync.c:1061:65:
Implicit
conversion loses integer precision: 'unsigned long' to 'int'
￿org.eclipse.paho.mqtt.c-1.0.1/src/MQTTAsync.c:1234:9: Code
will
never be executed
￿org.eclipse.paho.mqtt.c-1.0.1/src/MQTTAsync.c:1819:41:
Implicit
conversion loses integer precision: 'size_t' (aka 'unsigned
long')
to
'int'
￿org.eclipse.paho.mqtt.c-1.0.1/src/MQTTAsync.c:1877:104:
Implicit
conversion loses integer precision: 'unsigned long' to 'int'
￿org.eclipse.paho.mqtt.c-1.0.1/src/MQTTAsync.c:2192:35:
Implicit
conversion loses integer precision: 'size_t' (aka 'unsigned
long')
to
'int'
￿org.eclipse.paho.mqtt.c-1.0.1/src/MQTTAsync.c:2265:39:
Implicit
conversion loses integer precision: 'size_t' (aka 'unsigned
long')
to
'int'
￿org.eclipse.paho.mqtt.c-1.0.1/src/MQTTAsync.c:2325:40:
Implicit
conversion loses integer precision: 'size_t' (aka 'unsigned
long')
to
'int'
￿org.eclipse.paho.mqtt.c-1.0.1/src/Socket.c
￿org.eclipse.paho.mqtt.c-1.0.1/src/Socket.c:301:12: Implicit
conversion loses integer precision: 'ssize_t' (aka 'long') to
'int'
￿org.eclipse.paho.mqtt.c-1.0.1/src/Socket.c:345:12: Implicit
conversion loses integer precision: 'ssize_t' (aka 'long') to
'int'
￿org.eclipse.paho.mqtt.c-1.0.1/src/Socket.c:410:7: Implicit
conversion loses integer precision: 'ssize_t' (aka 'long') to
'int'
￿org.eclipse.paho.mqtt.c-1.0.1/src/Socket.c:441:45: Implicit
conversion loses integer precision: 'size_t' (aka 'unsigned
long')
to
'int'
￿org.eclipse.paho.mqtt.c-1.0.1/src/Socket.c:476:70: Implicit
conversion loses integer precision: 'unsigned long' to 'int'
￿org.eclipse.paho.mqtt.c-1.0.1/src/Socket.c:531:12: Implicit
conversion loses integer precision: 'ssize_t' (aka 'long') to
'int'
￿org.eclipse.paho.mqtt.c-1.0.1/src/Socket.c:736:27: Implicit
conversion loses integer precision: 'unsigned long' to 'int'
￿org.eclipse.paho.mqtt.c-1.0.1/src/Thread.c
￿org.eclipse.paho.mqtt.c-1.0.1/src/Thread.c:233:8: 'sem_init'
is
deprecated
￿org.eclipse.paho.mqtt.c-1.0.1/src/Thread.c:300:2:
'sem_getvalue'
is
deprecated
￿org.eclipse.paho.mqtt.c-1.0.1/src/Thread.c:354:8:
'sem_destroy'
is
deprecated
￿org.eclipse.paho.mqtt.c-1.0.1/src/utf-8.c
￿org.eclipse.paho.mqtt.c-1.0.1/src/utf-8.c:156:21: Implicit
conversion loses integer precision: 'unsigned long' to 'int'
￿org.eclipse.paho.mqtt.c-1.0.1/src/Log.c
￿org.eclipse.paho.mqtt.c-1.0.1/src/Log.c:186:10: Implicit
conversion
loses integer precision: 'unsigned long' to 'int'
￿org.eclipse.paho.mqtt.c-1.0.1/src/MQTTVersion.c
￿org.eclipse.paho.mqtt.c-1.0.1/src/MQTTVersion.c:74:16:
Implicit
conversion loses integer precision: 'unsigned long' to 'int'
￿org.eclipse.paho.mqtt.c-1.0.1/src/MQTTPacket.c
￿org.eclipse.paho.mqtt.c-1.0.1/src/MQTTPacket.c:181:43:
Implicit
conversion loses integer precision: 'size_t' (aka 'unsigned
long')
to
'int'
￿org.eclipse.paho.mqtt.c-1.0.1/src/MQTTPacket.c:430:12:
Implicit
conversion loses integer precision: 'unsigned long' to 'int'
￿org.eclipse.paho.mqtt.c-1.0.1/src/MQTTPacket.c:498:28:
Implicit
conversion loses integer precision: 'unsigned long' to 'int'
￿org.eclipse.paho.mqtt.c-1.0.1/src/MQTTPacket.c:692:18:
Implicit
conversion loses integer precision: 'size_t' (aka 'unsigned
long')
to
'int'
￿org.eclipse.paho.mqtt.c-1.0.1/src/MQTTPacket.c:704:18:
Implicit
conversion loses integer precision: 'size_t' (aka 'unsigned
long')
to
'int'
￿org.eclipse.paho.mqtt.c-1.0.1/src/MQTTPersistenceDefault.c


￿org.eclipse.paho.mqtt.c-1.0.1/src/MQTTPersistenceDefault.c:226:
1
3:
Implicit conversion loses integer precision: 'unsigned long' to
'int'

￿org.eclipse.paho.mqtt.c-1.0.1/src/MQTTPersistenceDefault.c:257:
3
:
Code will never be executed
￿org.eclipse.paho.mqtt.c-1.0.1/src/MQTTClient.c
￿org.eclipse.paho.mqtt.c-1.0.1/src/MQTTClient.c:174:21:
Implicit
conversion loses integer precision: 'long' to 'useconds_t' (aka
'unsigned int')
￿org.eclipse.paho.mqtt.c-1.0.1/src/MQTTClient.c:750:103:
Implicit
conversion loses integer precision: 'unsigned long' to 'int'
￿org.eclipse.paho.mqtt.c-1.0.1/src/MQTTClient.c:1247:32:
Implicit
conversion loses integer precision: 'unsigned long' to 'int'
￿org.eclipse.paho.mqtt.c-1.0.1/src/MQTTClient.c:1345:32:
Implicit
conversion loses integer precision: 'unsigned long' to 'int'
￿org.eclipse.paho.mqtt.c-1.0.1/src/MQTTClient.c:1625:47:
Implicit
conversion loses integer precision: 'long' to 'int'
￿org.eclipse.paho.mqtt.c-1.0.1/src/MQTTClient.c:1629:42:
Implicit
conversion loses integer precision: 'long' to 'int'
￿org.eclipse.paho.mqtt.c-1.0.1/src/MQTTClient.c:1631:41:
Implicit
conversion loses integer precision: 'long' to 'int'
￿org.eclipse.paho.mqtt.c-1.0.1/src/MQTTClient.c:1633:43:
Implicit
conversion loses integer precision: 'long' to 'int'
￿org.eclipse.paho.mqtt.c-1.0.1/src/MQTTPersistence.c
￿org.eclipse.paho.mqtt.c-1.0.1/src/MQTTPersistence.c:317:28:
Implicit
conversion loses integer precision: 'size_t' (aka 'unsigned
long')
to
'int'
￿org.eclipse.paho.mqtt.c-1.0.1/src/MQTTPersistence.c:355:13:
Implicit
conversion loses integer precision: 'size_t' (aka 'unsigned
long')
to
'int'
￿org.eclipse.paho.mqtt.c-1.0.1/src/MQTTPersistence.c:359:16:
Implicit
conversion loses integer precision: 'size_t' (aka 'unsigned
long')
to
'int'
￿org.eclipse.paho.mqtt.c-1.0.1/src/MQTTPersistence.c:515:43:
Implicit
conversion loses integer precision: 'unsigned long' to 'int'
￿org.eclipse.paho.mqtt.c-1.0.1/src/MQTTPersistence.c:567:26:
Implicit
conversion loses integer precision: 'unsigned long' to 'int'
￿org.eclipse.paho.mqtt.c-1.0.1/src/MQTTPersistence.c:591:27:
Implicit
conversion loses integer precision: 'size_t' (aka 'unsigned
long')
to
'int'
￿org.eclipse.paho.mqtt.c-1.0.1/src/MQTTProtocolClient.c
￿org.eclipse.paho.mqtt.c-1.0.1/src/MQTTProtocolClient.c:212:31:
Implicit conversion loses integer precision: 'unsigned long' to
'int'
￿org.eclipse.paho.mqtt.c-1.0.1/src/MQTTPacketOut.c
￿org.eclipse.paho.mqtt.c-1.0.1/src/MQTTPacketOut.c:54:65:
Implicit
conversion loses integer precision: 'unsigned long' to 'int'
￿org.eclipse.paho.mqtt.c-1.0.1/src/MQTTProtocolOut.c
￿org.eclipse.paho.mqtt.c-1.0.1/src/MQTTProtocolOut.c:59:28:
Implicit
conversion loses integer precision: 'long' to 'int'
￿org.eclipse.paho.mqtt.c-1.0.1/src/MQTTProtocolOut.c:67:8:
Implicit
conversion loses integer precision: 'unsigned long' to ‘int’

Errors
￿org.eclipse.paho.mqtt.c-1.0.1/src/Heap.c
￿org.eclipse.paho.mqtt.c-1.0.1/src/Heap.c:77:21: Too few
arguments
provided to function-like macro invocation
￿org.eclipse.paho.mqtt.c-1.0.1/src/Heap.c:77:12: Expected ';'
after
top level declarator
￿org.eclipse.paho.mqtt.c-1.0.1/src/Heap.c:145:21: Too few
arguments
provided to function-like macro invocation
￿org.eclipse.paho.mqtt.c-1.0.1/src/Heap.c:288:22: Too few
arguments
provided to function-like macro invocation


_______________________________________________
paho-dev mailing list
paho-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or
unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/paho-dev

--
Ian Craggs
icraggs@xxxxxxxxxx                  IBM United Kingdom
Paho Project Lead; Committer on Mosquitto

_______________________________________________
paho-dev mailing list
paho-dev@xxxxxxxxxxx <mailto:paho-dev@xxxxxxxxxxx>
To change your delivery options, retrieve your password, or
unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/paho-dev


_______________________________________________
paho-dev mailing list
paho-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or
unsubscribe
>from this list, visit
https://dev.eclipse.org/mailman/listinfo/paho-dev

_______________________________________________
paho-dev mailing list
paho-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or
unsubscribe
>from this list, visit
https://dev.eclipse.org/mailman/listinfo/paho-dev






_______________________________________________
paho-dev mailing list
paho-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or
unsubscribe
>from this list, visit
https://dev.eclipse.org/mailman/listinfo/paho-dev

_______________________________________________
paho-dev mailing list
paho-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or
unsubscribe
>from this list, visit
https://dev.eclipse.org/mailman/listinfo/paho-dev


_______________________________________________
paho-dev mailing list
paho-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe
>from this list, visit
https://dev.eclipse.org/mailman/listinfo/paho-dev

_______________________________________________
paho-dev mailing list
paho-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe
>from this list, visit
https://dev.eclipse.org/mailman/listinfo/paho-dev




_______________________________________________
paho-dev mailing list
paho-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/paho-dev



Back to the top