Jetpack 4.5 compile nvarguscamerasrc from public_sources throws error in make

Hello,
I need to modify and compile nvarguscamerasrc for Jetpack 4.5 from public_sources.
But I am stuck in compiling without modifying the source. ( I am compiling directly on Jetson NANO)

In Jetpack 4.4 it was working correctly, but when I try to use .so file from Jetpack 4.4 I get other errors.
Anyone know how to solve this?
I did as described in README.txt.

I get this error in make:

~/nvarguscamerasrc$ make
g++ -c gstnvarguscamerasrc.cpp -fPIC pkg-config --cflags gstreamer-1.0 gstreamer-base-1.0 gstreamer-video-1.0 gstreamer-allocators-1.0 glib-2.0 -I./ -I…/ -I/usr/src/jetson_multimedia_api/include/ -I/usr/src/jetson_multimedia_api/argus/samples/utils/ -o gstnvarguscamerasrc.o
gstnvarguscamerasrc.cpp: In member function ‘virtual bool ArgusCamera::StreamConsumer::threadExecute(GstNvArgusCameraSrc*)’:
gstnvarguscamerasrc.cpp:302:5: error: reference to ‘Status’ is ambiguous
Status frame_status;
^~~~~~
In file included from /usr/src/jetson_multimedia_api/include/Argus/Argus.h:116:0,
from gstnvarguscamerasrc.cpp:47:
/usr/src/jetson_multimedia_api/include/Argus/Types.h:52:13: note: candidates are: typedef int Status
typedef int Status;
^~~~~~
/usr/src/jetson_multimedia_api/include/Argus/Types.h:93:6: note: enum Argus::Status
enum Status
^~~~~~
gstnvarguscamerasrc.cpp:333:7: error: reference to ‘Status’ is ambiguous
Status argusStatus = iEventError->getStatus();
^~~~~~
In file included from /usr/src/jetson_multimedia_api/include/Argus/Argus.h:116:0,
from gstnvarguscamerasrc.cpp:47:
/usr/src/jetson_multimedia_api/include/Argus/Types.h:52:13: note: candidates are: typedef int Status
typedef int Status;
^~~~~~
/usr/src/jetson_multimedia_api/include/Argus/Types.h:93:6: note: enum Argus::Status
enum Status
^~~~~~
gstnvarguscamerasrc.cpp:334:36: error: ‘argusStatus’ was not declared in this scope
error = g_error_new (domain, argusStatus, getStatusString(argusStatus));
^~~~~~~~~~~
gstnvarguscamerasrc.cpp:334:36: note: suggested alternative: ‘Status’
error = g_error_new (domain, argusStatus, getStatusString(argusStatus));
^~~~~~~~~~~
Status
gstnvarguscamerasrc.cpp:344:83: error: ‘frame_status’ was not declared in this scope
UniqueObj frame(iFrameConsumer->acquireFrame(ACQUIRE_FRAME_TIMEOUT, &frame_status));
^~~~~~~~~~~~
gstnvarguscamerasrc.cpp:344:83: note: suggested alternative: ‘si_status’
UniqueObj frame(iFrameConsumer->acquireFrame(ACQUIRE_FRAME_TIMEOUT, &frame_status));
^~~~~~~~~~~~
si_status
Makefile:63: recipe for target ‘gstnvarguscamerasrc.o’ failed

Best regards,
jb

Have apply below to compile the source.

diff --git a/gst-nvarguscamera/gstnvarguscamerasrc.cpp b/gst-nvarguscamera/gstnvarguscamerasrc.cpp
index fa1e0d8..b906ec8 100644
--- a/gst-nvarguscamera/gstnvarguscamerasrc.cpp
+++ b/gst-nvarguscamera/gstnvarguscamerasrc.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017-2020, NVIDIA CORPORATION. All rights reserved.
+ * Copyright (c) 2017-2021, NVIDIA CORPORATION. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -299,7 +299,7 @@ bool StreamConsumer::threadExecute(GstNvArgusCameraSrc *src)
   src->frameInfo->fd = -1;
   while (true)
   {
-    Status frame_status;
+    Argus::Status frame_status;
     GError *error = NULL;
     Event* event = NULL;
     IEvent* iEvent = NULL;
@@ -330,7 +330,7 @@ bool StreamConsumer::threadExecute(GstNvArgusCameraSrc *src)

       src->argus_in_error = TRUE;
       const IEventError* iEventError = interface_cast<const IEventError>(event);
-      Status argusStatus = iEventError->getStatus();
+      Argus::Status argusStatus = iEventError->getStatus();
       error = g_error_new (domain, argusStatus, getStatusString(argusStatus));
       GstMessage *message = gst_message_new_error (GST_OBJECT(src), error, "Argus Error Status");
       gst_element_post_message (GST_ELEMENT_CAST(src), message);
1 Like

Thank you very much! I will try it out today and mark resolved if it’s working! :)