[BGPCEP-120] Unable to build BGPCEP on Mac OSX Created: 11/Aug/14  Updated: 03/Mar/19  Resolved: 25/Aug/14

Status: Resolved
Project: bgpcep
Component/s: General
Affects Version/s: Bugzilla Migration
Fix Version/s: Bugzilla Migration

Type: Bug
Reporter: Jamie Goodyear Assignee: Milos Fabian
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: Mac OS
Platform: PC


External issue ID: 1525

 Description   

I've been attempting to build BGPCEP from a fresh clone of master, and keep encountering java.lang.UnsatisfiedLinkError on:

BGPPeerModuleTest.testCreateBeanWithMD5:97 » UnsatisfiedLink /private/var/fold... BGPPeerModuleTest.testMD5ValidationFailure:105 » UnsatisfiedLink /private/var/...

Taking a closer look at the output:

**testCreateBeanWithMD5(org.opendaylight.controller.config.yang.bgp.rib.impl.BGPPeerModuleTest) Time elapsed: 0.09 sec <<< ERROR! java.lang.UnsatisfiedLinkError: /private/var/folders/vs/fbh839yj3t3dk5rwdnh2lsl00000gn/T/libtcpmd5-jni.so7458397215669977323.tmp: dlopen(/private/var/folders/vs/fbh839yj3t3dk5rwdnh2lsl00000gn/T/libtcpmd5-jni.so7458397215669977323.tmp, 1): no suitable image found. Did find: /private/var/folders/vs/fbh839yj3t3dk5rwdnh2lsl00000gn/T/libtcpmd5-jni.so7458397215669977323.tmp: unknown file type, first eight bytes: 0x7F 0x45 0x4C 0x46 0x02 0x01 0x01 0x00

The same code will build on Windows.



 Comments   
Comment by Dana Kutenicsova [ 13/Aug/14 ]

Can you confirm that the problem does still exist?

Comment by Jamie Goodyear [ 15/Aug/14 ]

As of commit 87240020dd47e53f2efcbb0c0b65c1943e5700cb this problem is still occurring.

Comment by Dana Kutenicsova [ 18/Aug/14 ]

https://git.opendaylight.org/gerrit/#/c/10021

Comment by Dana Kutenicsova [ 18/Aug/14 ]

Can you verify please with the included fix?

Comment by Jamie Goodyear [ 18/Aug/14 ]

I'm seeing:

Starting Core 0 with 1 source files... [ERROR] /Users/jgoodyear/Documents/tcpmd5/jni/src/main/c/tcpmd5_jni.c:19:10: fatal error: 'linux/tcp.h' file not found [ERROR] #include <linux/tcp.h>

When building on Max OSX using latest patch set from Gerrit 10021.

Comment by Robert Varga [ 18/Aug/14 ]

Jamie, tcpmd5 project's JNI component requires Linux to build, so building that project on that platform is not currently supported.

Comment by Jamie Goodyear [ 18/Aug/14 ]

Hmm, any way to have it catch a build error and state platform not supported for build purposes?

Comment by Milos Fabian [ 18/Aug/14 ]

Hi Jamie, back to the origin issue - failing BGP build. Gerrit 10021 should fix the problem with those two tests - now, they should be skipped, because tcpmd5 is supported only for Linux (64-bit). I tested fix with 32-bit Linux (got UnsatisfiedLinkError before, too). Could you please confirm it is working properly on your environment with latest artifacts? Thank you!

Comment by Jamie Goodyear [ 18/Aug/14 ]

I'm still seeing:

[INFO] Preparing Nar dependencies
[INFO] Unpacking 0 dependencies to /Users/jgoodyear/Documents/tcpmd5/jni/target/nar
[INFO] Compiling 1 native files
[INFO] Warning: clang cannot dynamically link libgcc
[INFO] Warning: clang cannot dynamically link libgcc
[INFO] 1 total files to be compiled.
[INFO] 1 total files to be compiled.
[INFO] Found 8 processors available
[INFO] Found 8 processors available
[INFO] Limited used processors to 1
[INFO] Limited used processors to 1
[INFO]
Starting Core 0 with 1 source files...
[INFO]
Starting Core 0 with 1 source files...
[ERROR] /Users/jgoodyear/Documents/tcpmd5/jni/src/main/c/tcpmd5_jni.c:19:10: fatal error: 'linux/tcp.h' file not found
[ERROR] #include <linux/tcp.h>
[ERROR] ^
[ERROR] 1 error generated.

During mvn clean install.

I've pulled the latest code, and applied the below:
git fetch https://git.opendaylight.org/gerrit/tcpmd5 refs/changes/21/10021/4 && git checkout FETCH_HEAD

Cheers,
Jamie

Comment by Milos Fabian [ 18/Aug/14 ]

Hi Jamie,
as Robert wrote - you won't be able to build tcpmd5/jni project on OSX. Since the fix has been already merged, just try to build BGPCEP with "mvn clean install -U".

Comment by Dana Kutenicsova [ 25/Aug/14 ]

BGPCEP is compilable, tcp-md5 is not supported on MAC.

Generated at Wed Feb 07 19:12:05 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.