[OTR-dev] java-otr build not working?

Ian Goldberg ian at cypherpunks.ca
Tue Jul 3 07:36:46 EDT 2012


On Mon, Jul 02, 2012 at 10:24:02PM -0400, M. C. McGrath (Shidash) wrote:
> Hello,
> I am trying to set up java-otr so I can use it for developing software but am having some trouble even running the example programs. I'm not sure if this should go on this list. Please tell me if this is not the right place.
> 
> So I got sun JDK installed and working with other java programs and extracted java-otr. When trying to run the demo I followed the instructions in the README exactly and typed ./build to compile the source. I got these errors-
> cdriver/driver.c: In function ‘main’:
> cdriver/driver.c:92:4: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘size_t’ [-Wformat]
> cdriver/driver.c:96:6: error: ‘OTRL_FRAGMENT_SEND_SKIP’ undeclared (first use in this function)
> cdriver/driver.c:96:6: note: each undeclared identifier is reported only once for each function it appears in
> cdriver/driver.c:96:6: warning: passing argument 7 of ‘otrl_message_sending’ from incompatible pointer type [enabled by default]
> In file included from cdriver/driver.c:3:0:
> /usr/include/libotr/message.h:136:14: note: expected ‘const char *’ but argument is of type ‘char **’
> cdriver/driver.c:96:6: error: too many arguments to function ‘otrl_message_sending’
> In file included from cdriver/driver.c:3:0:
> /usr/include/libotr/message.h:136:14: note: declared here
> cdriver/driver.c:103:4: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘size_t’ [-Wformat]
> cdriver/driver.c:117:6: error: too many arguments to function ‘otrl_message_receiving’
> In file included from cdriver/driver.c:3:0:
> /usr/include/libotr/message.h:168:5: note: declared here
> cdriver/driver.c:119:5: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘size_t’ [-Wformat]
> javac: directory not found: ../classes
> Usage: javac <options> <source files>
> use -help for a list of possible options
> 
> I have libotr installed. What exactly am I doing wrong when compiling the source? I'm guessing this is an issue on my end but I have tried to find the problem for many hours to no avail. To me it looks like there are issues that make the library nonfunctional but I doubt this is the case.
> 
> Thanks!

It appears there are two issues with the C driver above (which is only
used for the demo, not for java-otr itself):

- It's meant for a 32-bit build (the "%d" / size_t errors)
- It was developed against a 4.0-prerelease version of libotr.  It 
  should only need slight changes to build against the 4.0 public beta 
  that's out now; can you try it with the latest beta
  http://otr.cypherpunks.ca/libotr-4.0.0-beta2.tar.gz
  and see if that clears things up?  You may have to slightly touch up
  the arguments to otrl_message_{sending,receiving}; I don't remember
  what the state of libotr was when java-otr was written.

To address the javac error you're seeing at the end, just mkdir classes
in the java-otr directory.  Not sure why that's missing from the distro.

Thanks, and let us know if you have further questions.

   - Ian



More information about the OTR-dev mailing list