browndeer / coprthr

The CO-PRocessing THReads (COPRTHR) SDK - latest release is v1.6.2 (Freewill)
http://www.browndeertechnology.com/coprthr.html
Other
94 stars 35 forks source link

Errors building coprthr on cygwin #13

Closed stevechk closed 10 years ago

stevechk commented 10 years ago

I'm trying to get the library to compile under cygwin. I built the dependent libraries from source, and have all the lib*.a files (though it looks like the .so gets mangled by cygwin). I made a couple of small tweaks to get most of it to compile, but getting stuck with the error below. Any ideas?

$ make
make -C src/libocl
make[1]: Entering directory '/home/steve/coprthr/src/libocl'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/home/steve/coprthr/src/libocl'
make -C src/libclrpc
make[1]: Entering directory '/home/steve/coprthr/src/libclrpc'
cc -g -O2 -g -O2 -fPIC -o clrpcd clrpcd.o clrpc.gen.o   -lpthread -ldl -lrt  -L/usr/local/lib -levent -levent_pthreads -levent_pthreads -L/usr/local/lib -lconfig \
        -L../libocl -locl -L. -lclrpc
../libocl/libocl.a(libocl.o): In function `read_oclconf_info':
/home/steve/coprthr/src/libocl/libocl.c:654: undefined reference to `config_init'
/home/steve/coprthr/src/libocl/libocl.c:654:(.text+0x7f4): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `config_init'
...

Looks like libocl.a gets built fine, but for some reason the link with libconfig is failing?

Also, are you interested in providing cygwin compatibility in general? I'd be happy to send you a pull request for any changes when I'm done.

thanks Steve

stevechk commented 10 years ago

Looks like the issue is due to library ordering. The following appears to compile fine:

cc -g -O2 -g -O2 -fPIC -o clrpcd clrpcd.o clrpc.gen.o -L../libocl -L/usr/local/lib -L. -locl -lclrpc -lpthread -ldl -lrt -levent -levent_pthreads -levent_pthreads -lconfig

Still working through the rest of the changes needed.

browndeer commented 10 years ago

We have not tested on cygwin.

If you report whatever else you find, we will update the 1.6 branch and include in the next release.

stevechk wrote:

Looks like the issue is due to library ordering. The following appears to compile fine:

cc -g -O2 -g -O2 -fPIC -o clrpcd clrpcd.o clrpc.gen.o -L../libocl -L/usr/local/lib -L. -locl -lclrpc -lpthread -ldl -lrt -levent -levent_pthreads -levent_pthreads -lconfig

Still working through the rest of the changes needed.

— Reply to this email directly or view it on GitHub https://github.com/browndeer/coprthr/issues/13#issuecomment-40871455.

David Richie, Ph.D. Brown Deer Technology 1641 Denwright Court Forest Hill, MD 21050 410-459-3848 drichie@browndeertechnology.com www.browndeertechnology.com

browndeer commented 10 years ago

Fixed https://github.com/browndeer/coprthr/commit/27f64042bf88ed2f5295ea4d0f77ceebca821402