Building only FFMPEG preset for Linux x86_64 only

536 views
Skip to first unread message

Rishabh Joshi

unread,
Nov 15, 2017, 8:17:31 AM11/15/17
to javacpp
Hi,

I am trying to build the FFMPEG preset from the master branch and I am interested in building FFMPEG preset for "linux-x86_64" platform only. How do I go about it?




This is what I have tried till now.
As per instructions here - https://github.com/bytedeco/javacpp-presets/wiki/Build-Environments I did the following:

git clone https://github.com/bytedeco/javacpp.git --branch master
cd javacpp
mvn clean install deploy   #I have setup a private repository
cd ../javacpp-presets
./cppbuild.sh -platform linux-x86_64 install ffmpeg
mvn clean install deploy -Djavacpp.platform=linux-x86_64

I have modified the pom.xml under "javacpp-presets" as below, for I do not want to build any other presets:

diff --git a/pom.xml b/pom.xml
index bf8a3f1
..31032e9 100644
--- a/pom.xml
+++ b/pom.xml
@@ -37,9 +37,9 @@
   
</developers>
 
   <modules>
-    <module>opencv</
module>
+    <!--<module>opencv</module>-->
     <module>ffmpeg</
module>
-    <module>flycapture</module>
+    <!--<module>flycapture</
module>
     
<module>libdc1394</module>
     <module>libfreenect</
module>
     
<module>libfreenect2</module>
@@ -62,7 +62,7 @@
     <module>tensorflow</
module>
     
<module>ale</module>
    odule>liquidfun</
module>
-    <module>skia</module>
+    <module>skia</
module>-->
   
</modules>
 
   <prerequisites>
@@ -79,12 +79,12 @@
     <snapshotRepository>
       <id>sonatype-nexus-snapshots</
id>
       
<name>Sonatype Nexus Snapshots</name>
-      <url>https:/
/oss.sonatype.org/content/repositories/snapshots/</url>
+      <url>https://10.10.10.10:8443/repository/maven-snapshots/</url>
     
</snapshotRepository>
     <repository>
       <id>sonatype-nexus-staging</
id>
       
<name>Sonatype Nexus Staging</name>
-      <url>https:/
/oss.sonatype.org/service/local/staging/deploy/maven2/</url>
+      <url>https://10.10.10.10:8443/repository/maven-releases/</url>
     
</repository>
   </
distributionManagement>

@@ -119,7 +119,7 @@
     
<repository>
       
<id>sonatype-nexus-snapshots</id>
       <name>Sonatype Nexus Snapshots</
name>
-      <url>https://oss.sonatype.org/content/repositories/snapshots</url>
+      <url>https://10.10.10.10:8443/repository/maven-public/</url>
       
<releases>
         
<enabled>false</enabled>
       </
releases>
@@ -132,7 +132,7 @@
     
<pluginRepository>
       
<id>sonatype-nexus-snapshots</id>
       <name>Sonatype Nexus Snapshots</
name>
-      <url>https://oss.sonatype.org/content/repositories/snapshots</url>
+      <url>https://10.10.10.10:8443/repository/maven-public/</url>
       
<releases>
         
<enabled>false</enabled>
       </
releases>

and also modified another pom.xml located at "ffmpeg/platform/pom.xml" as follows:

diff --git a/ffmpeg/platform/pom.xml b/ffmpeg/platform/pom.xml
index
0822def..4367e11 100644
--- a/ffmpeg/platform/pom.xml
+++ b/ffmpeg/platform/pom.xml
@@ -25,6 +25,7 @@
       
<artifactId>${javacpp.moduleId}</artifactId>
       
<version>${project.version}</version>
     
</dependency>
+    <!--
     <dependency>
       <groupId>${project.groupId}</
groupId>
       
<artifactId>${javacpp.moduleId}</artifactId>
@@ -43,12 +44,14 @@
       
<version>${project.version}</version>
       
<classifier>${javacpp.platform.linux-x86}</classifier>
     
</dependency>
+    -->
     <dependency>
       <groupId>${project.groupId}</
groupId>
       
<artifactId>${javacpp.moduleId}</artifactId>
       
<version>${project.version}</version>
       
<classifier>${javacpp.platform.linux-x86_64}</classifier>
     
</dependency>
+    <!--
     <dependency>
       <groupId>${project.groupId}</
groupId>
       
<artifactId>${javacpp.moduleId}</artifactId>
@@ -79,6 +82,7 @@
       
<version>${project.version}</version>
       
<classifier>${javacpp.platform.windows-x86_64}</classifier>
     
</dependency>
+    -->
   </
dependencies>
 
   
<build>
@@ -91,7 +95,10 @@
             
<configuration>
               
<archive>
                 
<manifestEntries>
+<!--
                   
<Class-Path>${javacpp.moduleId}.jar ${javacpp.moduleId}-linux-x86.jar ${javacpp.moduleId}-linux-x86_64.jar ${javacpp.moduleId}-linux-armhf.jar ${javacpp.moduleId}-linux-ppc64le.jar ${javacpp.moduleId}-macosx-x86_64.jar ${javacpp.moduleId}-windows-x86.jar ${javacpp.moduleId}-windows-x86_64.jar</Class-Path>
+-->
+                  <Class-Path>${javacpp.moduleId}.jar ${javacpp.moduleId}-linux-x86_64.jar</
Class-Path>
                 
</manifestEntries>
               </
archive>
             
</configuration>

Now, when I check my private repository, I do not see any artifacts deployed for "ffmpeg-platform".

Thus the following build.gradle (snippet) fails on ./gradlew clean build run

repositories {
    mavenLocal
()
    maven
{
        url
"https://10.10.10.10:8443/repository/maven-public/"
   
}
}

dependencies
{
    compile
group: 'org.bytedeco.javacpp-presets', name: 'ffmpeg-platform', version: '3.4-1.3.4-SNAPSHOT'
    testCompile
group: 'junit', name: 'junit', version: '4.12'
}

with the following error:

FAILURE: Build failed with an exception.

* What went wrong:
Could not resolve all files for configuration ':compileClasspath'.
> Could not find ffmpeg-android-arm.jar (org.bytedeco.javacpp-presets:ffmpeg:3.4-1.3.4-SNAPSHOT).
 
Searched in the following locations:
      https
://10.10.10.10:8443/repository/maven-public/org/bytedeco/javacpp-presets/ffmpeg/3.4-1.3.4-SNAPSHOT/ffmpeg-3.4-1.3.4-20171115.121714-2-android-arm.jar
> Could not find ffmpeg-android-x86.jar (org.bytedeco.javacpp-presets:ffmpeg:3.4-1.3.4-SNAPSHOT).
 
Searched in the following locations:
      https
://10.10.10.10:8443/repository/maven-public/org/bytedeco/javacpp-presets/ffmpeg/3.4-1.3.4-SNAPSHOT/ffmpeg-3.4-1.3.4-20171115.121714-2-android-x86.jar
> Could not find ffmpeg-linux-x86.jar (org.bytedeco.javacpp-presets:ffmpeg:3.4-1.3.4-SNAPSHOT).
 
Searched in the following locations:
      https
://10.10.10.10:8443/repository/maven-public/org/bytedeco/javacpp-presets/ffmpeg/3.4-1.3.4-SNAPSHOT/ffmpeg-3.4-1.3.4-20171115.121714-2-linux-x86.jar
> Could not find ffmpeg-linux-armhf.jar (org.bytedeco.javacpp-presets:ffmpeg:3.4-1.3.4-SNAPSHOT).
 
Searched in the following locations:
      https
://10.10.10.10:8443/repository/maven-public/org/bytedeco/javacpp-presets/ffmpeg/3.4-1.3.4-SNAPSHOT/ffmpeg-3.4-1.3.4-20171115.121714-2-linux-armhf.jar
> Could not find ffmpeg-linux-ppc64le.jar (org.bytedeco.javacpp-presets:ffmpeg:3.4-1.3.4-SNAPSHOT).
 
Searched in the following locations:
      https
://10.10.10.10:8443/repository/maven-public/org/bytedeco/javacpp-presets/ffmpeg/3.4-1.3.4-SNAPSHOT/ffmpeg-3.4-1.3.4-20171115.121714-2-linux-ppc64le.jar
> Could not find ffmpeg-macosx-x86_64.jar (org.bytedeco.javacpp-presets:ffmpeg:3.4-1.3.4-SNAPSHOT).
 
Searched in the following locations:
      https
://10.10.10.10:8443/repository/maven-public/org/bytedeco/javacpp-presets/ffmpeg/3.4-1.3.4-SNAPSHOT/ffmpeg-3.4-1.3.4-20171115.121714-2-macosx-x86_64.jar
> Could not find ffmpeg-windows-x86.jar (org.bytedeco.javacpp-presets:ffmpeg:3.4-1.3.4-SNAPSHOT).
 
Searched in the following locations:
      https
://10.10.10.10:8443/repository/maven-public/org/bytedeco/javacpp-presets/ffmpeg/3.4-1.3.4-SNAPSHOT/ffmpeg-3.4-1.3.4-20171115.121714-2-windows-x86.jar
> Could not find ffmpeg-windows-x86_64.jar (org.bytedeco.javacpp-presets:ffmpeg:3.4-1.3.4-SNAPSHOT).
 
Searched in the following locations:
      https
://10.10.10.10:8443/repository/maven-public/org/bytedeco/javacpp-presets/ffmpeg/3.4-1.3.4-SNAPSHOT/ffmpeg-3.4-1.3.4-20171115.121714-2-windows-x86_64.jar

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

* Get more help at https://help.gradle.org

BUILD FAILED
in 1s
2 actionable tasks: 1 executed, 1 up-to-date

Samuel Audet

unread,
Nov 15, 2017, 6:55:31 PM11/15/17
to javacpp
You'll need to go inside the "platform" subdirectory and run "mvn install" from there as well, as explained here:

Then it should work fine!

Samuel

2017/11/15 22:17 "Rishabh Joshi" <rish...@gmail.com>:
--
You received this message because you are subscribed to the Google Groups "javacpp" group.
To unsubscribe from this group and stop receiving emails from it, send an email to javacpp-project+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Rishabh Joshi

unread,
Nov 16, 2017, 10:43:38 AM11/16/17
to javacpp
This worked, thanks!
To unsubscribe from this group and stop receiving emails from it, send an email to javacpp-proje...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages