DriveX-devs / OScar

OScar - the open ETSI C-ITS implementation
GNU General Public License v2.0
4 stars 2 forks source link

Source code does not compile #1

Closed swthorn closed 1 month ago

swthorn commented 2 months ago

Hi! Awesome work, I tried cloning and building the repository, but I get a bunch of ASN.1 type errors:

make > output.txt 2>& 
cat output.txt
gcc -Wall -O3 -Iinclude -Ioptions -Iasn1/include -Igeographiclib-port -c geographiclib-port/utmuts.c -o obj/geographiclib-port/utmuts.o
gcc -Wall -O3 -Iinclude -Ioptions -Iasn1/include -Igeographiclib-port -c geographiclib-port/utmuts_math.c -o obj/geographiclib-port/utmuts_math.o
g++ -Wall -O3 -Iinclude -std=c++17 -Ivehicle-visualizer/include -Igeographiclib-port -Iasn1/include -I. -ITransportAndNetworking/include -Ijson11 -Iasn1cpp -IceSerial -c vehicle-visualizer/src/vehicle-visualizer.cc -o obj/vehicle-visualizer/vehicle-visualizer.o
gcc -Wall -O3 -Iinclude -Ioptions -Iasn1/include -Igeographiclib-port -c asn1/src/ANY.c -o obj/asn1/ANY.o
gcc -Wall -O3 -Iinclude -Ioptions -Iasn1/include -Igeographiclib-port -c asn1/src/ANY_aper.c -o obj/asn1/ANY_aper.o
gcc -Wall -O3 -Iinclude -Ioptions -Iasn1/include -Igeographiclib-port -c asn1/src/ANY_ber.c -o obj/asn1/ANY_ber.o
gcc -Wall -O3 -Iinclude -Ioptions -Iasn1/include -Igeographiclib-port -c asn1/src/ANY_jer.c -o obj/asn1/ANY_jer.o
gcc -Wall -O3 -Iinclude -Ioptions -Iasn1/include -Igeographiclib-port -c asn1/src/ANY_uper.c -o obj/asn1/ANY_uper.o
gcc -Wall -O3 -Iinclude -Ioptions -Iasn1/include -Igeographiclib-port -c asn1/src/ANY_xer.c -o obj/asn1/ANY_xer.o
gcc -Wall -O3 -Iinclude -Ioptions -Iasn1/include -Igeographiclib-port -c asn1/src/AVIAEIIssuerIdentifier.c -o obj/asn1/AVIAEIIssuerIdentifier.o
gcc -Wall -O3 -Iinclude -Ioptions -Iasn1/include -Igeographiclib-port -c asn1/src/AbsolutePosition.c -o obj/asn1/AbsolutePosition.o
gcc -Wall -O3 -Iinclude -Ioptions -Iasn1/include -Igeographiclib-port -c asn1/src/AbsolutePositionWAltitude.c -o obj/asn1/AbsolutePositionWAltitude.o
gcc -Wall -O3 -Iinclude -Ioptions -Iasn1/include -Igeographiclib-port -c asn1/src/AbsolutePositions.c -o obj/asn1/AbsolutePositions.o
gcc -Wall -O3 -Iinclude -Ioptions -Iasn1/include -Igeographiclib-port -c asn1/src/AbsolutePositionsWAltitude.c -o obj/asn1/AbsolutePositionsWAltitude.o
gcc -Wall -O3 -Iinclude -Ioptions -Iasn1/include -Igeographiclib-port -c asn1/src/Acceleration3dWithConfidence.c -o obj/asn1/Acceleration3dWithConfidence.o
gcc -Wall -O3 -Iinclude -Ioptions -Iasn1/include -Igeographiclib-port -c asn1/src/AccelerationCartesian.c -o obj/asn1/AccelerationCartesian.o
gcc -Wall -O3 -Iinclude -Ioptions -Iasn1/include -Igeographiclib-port -c asn1/src/AccelerationChange.c -o obj/asn1/AccelerationChange.o
gcc -Wall -O3 -Iinclude -Ioptions -Iasn1/include -Igeographiclib-port -c asn1/src/AccelerationChangeIndication.c -o obj/asn1/AccelerationChangeIndication.o
gcc -Wall -O3 -Iinclude -Ioptions -Iasn1/include -Igeographiclib-port -c asn1/src/AccelerationComponent.c -o obj/asn1/AccelerationComponent.o
gcc -Wall -O3 -Iinclude -Ioptions -Iasn1/include -Igeographiclib-port -c asn1/src/AccelerationConfidence.c -o obj/asn1/AccelerationConfidence.o
gcc -Wall -O3 -Iinclude -Ioptions -Iasn1/include -Igeographiclib-port -c asn1/src/AccelerationConfidenceV1.c -o obj/asn1/AccelerationConfidenceV1.o
gcc -Wall -O3 -Iinclude -Ioptions -Iasn1/include -Igeographiclib-port -c asn1/src/AccelerationControl.c -o obj/asn1/AccelerationControl.o
gcc -Wall -O3 -Iinclude -Ioptions -Iasn1/include -Igeographiclib-port -c asn1/src/AccelerationControlV1.c -o obj/asn1/AccelerationControlV1.o
gcc -Wall -O3 -Iinclude -Ioptions -Iasn1/include -Igeographiclib-port -c asn1/src/AccelerationMagnitude.c -o obj/asn1/AccelerationMagnitude.o
gcc -Wall -O3 -Iinclude -Ioptions -Iasn1/include -Igeographiclib-port -c asn1/src/AccelerationMagnitudeValue.c -o obj/asn1/AccelerationMagnitudeValue.o
gcc -Wall -O3 -Iinclude -Ioptions -Iasn1/include -Igeographiclib-port -c asn1/src/AccelerationPolarWithZ.c -o obj/asn1/AccelerationPolarWithZ.o
gcc -Wall -O3 -Iinclude -Ioptions -Iasn1/include -Igeographiclib-port -c asn1/src/AccelerationValue.c -o obj/asn1/AccelerationValue.o
gcc -Wall -O3 -Iinclude -Ioptions -Iasn1/include -Igeographiclib-port -c asn1/src/AccessTechnologyClass.c -o obj/asn1/AccessTechnologyClass.o
gcc -Wall -O3 -Iinclude -Ioptions -Iasn1/include -Igeographiclib-port -c asn1/src/AccidentSubCauseCode.c -o obj/asn1/AccidentSubCauseCode.o
gcc -Wall -O3 -Iinclude -Ioptions -Iasn1/include -Igeographiclib-port -c asn1/src/AccidentSubCauseCodeV1.c -o obj/asn1/AccidentSubCauseCodeV1.o
gcc -Wall -O3 -Iinclude -Ioptions -Iasn1/include -Igeographiclib-port -c asn1/src/ActionID.c -o obj/asn1/ActionID.o
gcc -Wall -O3 -Iinclude -Ioptions -Iasn1/include -Igeographiclib-port -c asn1/src/ActionIDV1.c -o obj/asn1/ActionIDV1.o
gcc -Wall -O3 -Iinclude -Ioptions -Iasn1/include -Igeographiclib-port -c asn1/src/ActionId.c -o obj/asn1/ActionId.o
gcc -Wall -O3 -Iinclude -Ioptions -Iasn1/include -Igeographiclib-port -c asn1/src/ActionIdList.c -o obj/asn1/ActionIdList.o
gcc -Wall -O3 -Iinclude -Ioptions -Iasn1/include -Igeographiclib-port -c asn1/src/ActualNumberOfPassengers.c -o obj/asn1/ActualNumberOfPassengers.o
gcc -Wall -O3 -Iinclude -Ioptions -Iasn1/include -Igeographiclib-port -c asn1/src/AddRq.c -o obj/asn1/AddRq.o
gcc -Wall -O3 -Iinclude -Ioptions -Iasn1/include -Igeographiclib-port -c asn1/src/AdverseWeatherCondition-AdhesionSubCauseCode.c -o obj/asn1/AdverseWeatherCondition-AdhesionSubCauseCode.o
gcc -Wall -O3 -Iinclude -Ioptions -Iasn1/include -Igeographiclib-port -c asn1/src/AdverseWeatherCondition-AdhesionSubCauseCodeV1.c -o obj/asn1/AdverseWeatherCondition-AdhesionSubCauseCodeV1.o
gcc -Wall -O3 -Iinclude -Ioptions -Iasn1/include -Igeographiclib-port -c asn1/src/AdverseWeatherCondition-ExtremeWeatherConditionSubCauseCode.c -o obj/asn1/AdverseWeatherCondition-ExtremeWeatherConditionSubCauseCode.o
gcc -Wall -O3 -Iinclude -Ioptions -Iasn1/include -Igeographiclib-port -c asn1/src/AdverseWeatherCondition-ExtremeWeatherConditionSubCauseCodeV1.c -o obj/asn1/AdverseWeatherCondition-ExtremeWeatherConditionSubCauseCodeV1.o
gcc -Wall -O3 -Iinclude -Ioptions -Iasn1/include -Igeographiclib-port -c asn1/src/AdverseWeatherCondition-PrecipitationSubCauseCode.c -o obj/asn1/AdverseWeatherCondition-PrecipitationSubCauseCode.o
gcc -Wall -O3 -Iinclude -Ioptions -Iasn1/include -Igeographiclib-port -c asn1/src/AdverseWeatherCondition-PrecipitationSubCauseCodeV1.c -o obj/asn1/AdverseWeatherCondition-PrecipitationSubCauseCodeV1.o
gcc -Wall -O3 -Iinclude -Ioptions -Iasn1/include -Igeographiclib-port -c asn1/src/AdverseWeatherCondition-VisibilitySubCauseCode.c -o obj/asn1/AdverseWeatherCondition-VisibilitySubCauseCode.o
gcc -Wall -O3 -Iinclude -Ioptions -Iasn1/include -Igeographiclib-port -c asn1/src/AdverseWeatherCondition-VisibilitySubCauseCodeV1.c -o obj/asn1/AdverseWeatherCondition-VisibilitySubCauseCodeV1.o
gcc -Wall -O3 -Iinclude -Ioptions -Iasn1/include -Igeographiclib-port -c asn1/src/AdvisorySpeed.c -o obj/asn1/AdvisorySpeed.o
gcc -Wall -O3 -Iinclude -Ioptions -Iasn1/include -Igeographiclib-port -c asn1/src/AdvisorySpeedList.c -o obj/asn1/AdvisorySpeedList.o
gcc -Wall -O3 -Iinclude -Ioptions -Iasn1/include -Igeographiclib-port -c asn1/src/AdvisorySpeedType.c -o obj/asn1/AdvisorySpeedType.o
gcc -Wall -O3 -Iinclude -Ioptions -Iasn1/include -Igeographiclib-port -c asn1/src/AirHumidity.c -o obj/asn1/AirHumidity.o
gcc -Wall -O3 -Iinclude -Ioptions -Iasn1/include -Igeographiclib-port -c asn1/src/AlacarteContainer.c -o obj/asn1/AlacarteContainer.o
gcc -Wall -O3 -Iinclude -Ioptions -Iasn1/include -Igeographiclib-port -c asn1/src/AlacarteContainerV1.c -o obj/asn1/AlacarteContainerV1.o
gcc -Wall -O3 -Iinclude -Ioptions -Iasn1/include -Igeographiclib-port -c asn1/src/AllowedManeuvers.c -o obj/asn1/AllowedManeuvers.o
gcc -Wall -O3 -Iinclude -Ioptions -Iasn1/include -Igeographiclib-port -c asn1/src/AlphabetIndicator.c -o obj/asn1/AlphabetIndicator.o
gcc -Wall -O3 -Iinclude -Ioptions -Iasn1/include -Igeographiclib-port -c asn1/src/Altitude.c -o obj/asn1/Altitude.o
gcc -Wall -O3 -Iinclude -Ioptions -Iasn1/include -Igeographiclib-port -c asn1/src/AltitudeConfidence.c -o obj/asn1/AltitudeConfidence.o
gcc -Wall -O3 -Iinclude -Ioptions -Iasn1/include -Igeographiclib-port -c asn1/src/AltitudeConfidenceV1.c -o obj/asn1/AltitudeConfidenceV1.o
gcc -Wall -O3 -Iinclude -Ioptions -Iasn1/include -Igeographiclib-port -c asn1/src/AltitudeV1.c -o obj/asn1/AltitudeV1.o
gcc -Wall -O3 -Iinclude -Ioptions -Iasn1/include -Igeographiclib-port -c asn1/src/AltitudeValue.c -o obj/asn1/AltitudeValue.o
gcc -Wall -O3 -Iinclude -Ioptions -Iasn1/include -Igeographiclib-port -c asn1/src/AltitudeValueV1.c -o obj/asn1/AltitudeValueV1.o
gcc -Wall -O3 -Iinclude -Ioptions -Iasn1/include -Igeographiclib-port -c asn1/src/Angle.c -o obj/asn1/Angle.o
gcc -Wall -O3 -Iinclude -Ioptions -Iasn1/include -Igeographiclib-port -c asn1/src/AngleConfidence.c -o obj/asn1/AngleConfidence.o
gcc -Wall -O3 -Iinclude -Ioptions -Iasn1/include -Igeographiclib-port -c asn1/src/AngleConfidenceV1.c -o obj/asn1/AngleConfidenceV1.o
gcc -Wall -O3 -Iinclude -Ioptions -Iasn1/include -Igeographiclib-port -c asn1/src/AngularAccelerationConfidence.c -o obj/asn1/AngularAccelerationConfidence.o
gcc -Wall -O3 -Iinclude -Ioptions -Iasn1/include -Igeographiclib-port -c asn1/src/AngularSpeedConfidence.c -o obj/asn1/AngularSpeedConfidence.o
gcc -Wall -O3 -Iinclude -Ioptions -Iasn1/include -Igeographiclib-port -c asn1/src/AnimalSubclass.c -o obj/asn1/AnimalSubclass.o
gcc -Wall -O3 -Iinclude -Ioptions -Iasn1/include -Igeographiclib-port -c asn1/src/AnimalSubclassType.c -o obj/asn1/AnimalSubclassType.o
gcc -Wall -O3 -Iinclude -Ioptions -Iasn1/include -Igeographiclib-port -c asn1/src/AnimalSubclassTypeV1.c -o obj/asn1/AnimalSubclassTypeV1.o
gcc -Wall -O3 -Iinclude -Ioptions -Iasn1/include -Igeographiclib-port -c asn1/src/AnimalSubclassV1.c -o obj/asn1/AnimalSubclassV1.o
gcc -Wall -O3 -Iinclude -Ioptions -Iasn1/include -Igeographiclib-port -c asn1/src/AntennaOffsetSet.c -o obj/asn1/AntennaOffsetSet.o
gcc -Wall -O3 -Iinclude -Ioptions -Iasn1/include -Igeographiclib-port -c asn1/src/AnyCatalogue.c -o obj/asn1/AnyCatalogue.o
gcc -Wall -O3 -Iinclude -Ioptions -Iasn1/include -Igeographiclib-port -c asn1/src/ApproachID.c -o obj/asn1/ApproachID.o
gcc -Wall -O3 -Iinclude -Ioptions -Iasn1/include -Igeographiclib-port -c asn1/src/AreaCircular.c -o obj/asn1/AreaCircular.o
gcc -Wall -O3 -Iinclude -Ioptions -Iasn1/include -Igeographiclib-port -c asn1/src/AreaCircularV1.c -o obj/asn1/AreaCircularV1.o
gcc -Wall -O3 -Iinclude -Ioptions -Iasn1/include -Igeographiclib-port -c asn1/src/AreaEllipse.c -o obj/asn1/AreaEllipse.o
gcc -Wall -O3 -Iinclude -Ioptions -Iasn1/include -Igeographiclib-port -c asn1/src/AreaEllipseV1.c -o obj/asn1/AreaEllipseV1.o
gcc -Wall -O3 -Iinclude -Ioptions -Iasn1/include -Igeographiclib-port -c asn1/src/AreaPolygon.c -o obj/asn1/AreaPolygon.o
gcc -Wall -O3 -Iinclude -Ioptions -Iasn1/include -Igeographiclib-port -c asn1/src/AreaPolygonV1.c -o obj/asn1/AreaPolygonV1.o
gcc -Wall -O3 -Iinclude -Ioptions -Iasn1/include -Igeographiclib-port -c asn1/src/AreaRadial.c -o obj/asn1/AreaRadial.o
gcc -Wall -O3 -Iinclude -Ioptions -Iasn1/include -Igeographiclib-port -c asn1/src/AreaRadialV1.c -o obj/asn1/AreaRadialV1.o
gcc -Wall -O3 -Iinclude -Ioptions -Iasn1/include -Igeographiclib-port -c asn1/src/AreaRectangle.c -o obj/asn1/AreaRectangle.o
gcc -Wall -O3 -Iinclude -Ioptions -Iasn1/include -Igeographiclib-port -c asn1/src/AreaRectangleV1.c -o obj/asn1/AreaRectangleV1.o
gcc -Wall -O3 -Iinclude -Ioptions -Iasn1/include -Igeographiclib-port -c asn1/src/AttributeIdList.c -o obj/asn1/AttributeIdList.o
gcc -Wall -O3 -Iinclude -Ioptions -Iasn1/include -Igeographiclib-port -c asn1/src/AttributeList.c -o obj/asn1/AttributeList.o
gcc -Wall -O3 -Iinclude -Ioptions -Iasn1/include -Igeographiclib-port -c asn1/src/Attributes.c -o obj/asn1/Attributes.o
gcc -Wall -O3 -Iinclude -Ioptions -Iasn1/include -Igeographiclib-port -c asn1/src/AutomatedVehicleContainer.c -o obj/asn1/AutomatedVehicleContainer.o
gcc -Wall -O3 -Iinclude -Ioptions -Iasn1/include -Igeographiclib-port -c asn1/src/AutomatedVehicleRule.c -o obj/asn1/AutomatedVehicleRule.o
gcc -Wall -O3 -Iinclude -Ioptions -Iasn1/include -Igeographiclib-port -c asn1/src/AutomatedVehicleRules.c -o obj/asn1/AutomatedVehicleRules.o
gcc -Wall -O3 -Iinclude -Ioptions -Iasn1/include -Igeographiclib-port -c asn1/src/AvailableCPU.c -o obj/asn1/AvailableCPU.o
gcc -Wall -O3 -Iinclude -Ioptions -Iasn1/include -Igeographiclib-port -c asn1/src/AvcPart.c -o obj/asn1/AvcPart.o
gcc -Wall -O3 -Iinclude -Ioptions -Iasn1/include -Igeographiclib-port -c asn1/src/AviEriDateTime.c -o obj/asn1/AviEriDateTime.o
gcc -Wall -O3 -Iinclude -Ioptions -Iasn1/include -Igeographiclib-port -c asn1/src/AxleWeightLimits.c -o obj/asn1/AxleWeightLimits.o
gcc -Wall -O3 -Iinclude -Ioptions -Iasn1/include -Igeographiclib-port -c asn1/src/AxlesCount.c -o obj/asn1/AxlesCount.o
gcc -Wall -O3 -Iinclude -Ioptions -Iasn1/include -Igeographiclib-port -c asn1/src/BIT_STRING.c -o obj/asn1/BIT_STRING.o
gcc -Wall -O3 -Iinclude -Ioptions -Iasn1/include -Igeographiclib-port -c asn1/src/BIT_STRING_jer.c -o obj/asn1/BIT_STRING_jer.o
gcc -Wall -O3 -Iinclude -Ioptions -Iasn1/include -Igeographiclib-port -c asn1/src/BIT_STRING_oer.c -o obj/asn1/BIT_STRING_oer.o
gcc -Wall -O3 -Iinclude -Ioptions -Iasn1/include -Igeographiclib-port -c asn1/src/BIT_STRING_print.c -o obj/asn1/BIT_STRING_print.o
gcc -Wall -O3 -Iinclude -Ioptions -Iasn1/include -Igeographiclib-port -c asn1/src/BIT_STRING_rfill.c -o obj/asn1/BIT_STRING_rfill.o
gcc -Wall -O3 -Iinclude -Ioptions -Iasn1/include -Igeographiclib-port -c asn1/src/BIT_STRING_uper.c -o obj/asn1/BIT_STRING_uper.o
gcc -Wall -O3 -Iinclude -Ioptions -Iasn1/include -Igeographiclib-port -c asn1/src/BIT_STRING_xer.c -o obj/asn1/BIT_STRING_xer.o
gcc -Wall -O3 -Iinclude -Ioptions -Iasn1/include -Igeographiclib-port -c asn1/src/BMPString.c -o obj/asn1/BMPString.o
asn1/src/BMPString.c:36:5: error: initialization of ‘int (*)(const struct asn_TYPE_descriptor_s *, void **, const void *)’ from incompatible pointer type ‘asn_dec_rval_t (*)(const struct asn_codec_ctx_s *, const struct asn_TYPE_descriptor_s *, void **, const void *, size_t,  int)’ {aka ‘struct asn_dec_rval_s (*)(const struct asn_codec_ctx_s *, const struct asn_TYPE_descriptor_s *, void **, const void *, long unsigned int,  int)’} [-Wincompatible-pointer-types]
   36 |     OCTET_STRING_decode_ber,
      |     ^~~~~~~~~~~~~~~~~~~~~~~
asn1/src/BMPString.c:36:5: note: (near initialization for ‘asn_OP_BMPString.copy_struct’)
asn1/src/BMPString.c:37:5: error: initialization of ‘asn_dec_rval_t (*)(const struct asn_codec_ctx_s *, const struct asn_TYPE_descriptor_s *, void **, const void *, size_t,  int)’ {aka ‘struct asn_dec_rval_s (*)(const struct asn_codec_ctx_s *, const struct asn_TYPE_descriptor_s *, void **, const void *, long unsigned int,  int)’} from incompatible pointer type ‘asn_enc_rval_t (*)(const struct asn_TYPE_descriptor_s *, const void *, int,  ber_tlv_tag_t,  int (*)(const void *, size_t,  void *), void *)’ {aka ‘struct asn_enc_rval_s (*)(const struct asn_TYPE_descriptor_s *, const void *, int,  unsigned int,  int (*)(const void *, long unsigned int,  void *), void *)’} [-Wincompatible-pointer-types]
   37 |     OCTET_STRING_encode_der,
      |     ^~~~~~~~~~~~~~~~~~~~~~~
asn1/src/BMPString.c:37:5: note: (near initialization for ‘asn_OP_BMPString.ber_decoder’)
asn1/src/BMPString.c:43:5: error: initialization of ‘asn_enc_rval_t (*)(const struct asn_TYPE_descriptor_s *, const void *, int,  ber_tlv_tag_t,  int (*)(const void *, size_t,  void *), void *)’ {aka ‘struct asn_enc_rval_s (*)(const struct asn_TYPE_descriptor_s *, const void *, int,  unsigned int,  int (*)(const void *, long unsigned int,  void *), void *)’} from incompatible pointer type ‘asn_dec_rval_t (*)(const asn_codec_ctx_t *, const struct asn_TYPE_descriptor_s *, void **, const char *, const void *, size_t)’ {aka ‘struct asn_dec_rval_s (*)(const struct asn_codec_ctx_s *, const struct asn_TYPE_descriptor_s *, void **, const char *, const void *, long unsigned int)’} [-Wincompatible-pointer-types]
   43 |     BMPString_decode_xer,  /* Convert from UTF-8 */
      |     ^~~~~~~~~~~~~~~~~~~~
asn1/src/BMPString.c:43:5: note: (near initialization for ‘asn_OP_BMPString.der_encoder’)
asn1/src/BMPString.c:44:5: error: initialization of ‘asn_dec_rval_t (*)(const asn_codec_ctx_t *, const struct asn_TYPE_descriptor_s *, void **, const char *, const void *, size_t)’ {aka ‘struct asn_dec_rval_s (*)(const struct asn_codec_ctx_s *, const struct asn_TYPE_descriptor_s *, void **, const char *, const void *, long unsigned int)’} from incompatible pointer type ‘asn_enc_rval_t (*)(const struct asn_TYPE_descriptor_s *, const void *, int,  enum xer_encoder_flags_e,  int (*)(const void *, size_t,  void *), void *)’ {aka ‘struct asn_enc_rval_s (*)(const struct asn_TYPE_descriptor_s *, const void *, int,  enum xer_encoder_flags_e,  int (*)(const void *, long unsigned int,  void *), void *)’} [-Wincompatible-pointer-types]
   44 |     BMPString_encode_xer,  /* Convert to UTF-8 */
      |     ^~~~~~~~~~~~~~~~~~~~
asn1/src/BMPString.c:44:5: note: (near initialization for ‘asn_OP_BMPString.xer_decoder’)
asn1/src/BMPString.c:50:5: error: initialization of ‘asn_enc_rval_t (*)(const struct asn_TYPE_descriptor_s *, const void *, int,  enum xer_encoder_flags_e,  int (*)(const void *, size_t,  void *), void *)’ {aka ‘struct asn_enc_rval_s (*)(const struct asn_TYPE_descriptor_s *, const void *, int,  enum xer_encoder_flags_e,  int (*)(const void *, long unsigned int,  void *), void *)’} from incompatible pointer type ‘asn_enc_rval_t (*)(const struct asn_TYPE_descriptor_s *, const void *, int,  enum jer_encoder_flags_e,  int (*)(const void *, size_t,  void *), void *)’ {aka ‘struct asn_enc_rval_s (*)(const struct asn_TYPE_descriptor_s *, const void *, int,  enum jer_encoder_flags_e,  int (*)(const void *, long unsigned int,  void *), void *)’} [-Wincompatible-pointer-types]
   50 |     BMPString_encode_jer,  /* Convert to UTF-8 */
      |     ^~~~~~~~~~~~~~~~~~~~
asn1/src/BMPString.c:50:5: note: (near initialization for ‘asn_OP_BMPString.xer_encoder’)
asn1/src/BMPString.c:55:5: error: initialization of ‘asn_dec_rval_t (*)(const asn_codec_ctx_t *, const struct asn_TYPE_descriptor_s *, void **, const void *, size_t)’ {aka ‘struct asn_dec_rval_s (*)(const struct asn_codec_ctx_s *, const struct asn_TYPE_descriptor_s *, void **, const void *, long unsigned int)’} from incompatible pointer type ‘asn_dec_rval_t (*)(const struct asn_codec_ctx_s *, const struct asn_TYPE_descriptor_s *, const asn_oer_constraints_t *, void **, const void *, size_t)’ {aka ‘struct asn_dec_rval_s (*)(const struct asn_codec_ctx_s *, const struct asn_TYPE_descriptor_s *, const struct asn_oer_constraints_s *, void **, const void *, long unsigned int)’} [-Wincompatible-pointer-types]
   55 |     OCTET_STRING_decode_oer,
      |     ^~~~~~~~~~~~~~~~~~~~~~~
asn1/src/BMPString.c:55:5: note: (near initialization for ‘asn_OP_BMPString.jer_decoder’)
asn1/src/BMPString.c:56:5: error: initialization of ‘asn_enc_rval_t (*)(const struct asn_TYPE_descriptor_s *, const void *, int,  enum jer_encoder_flags_e,  int (*)(const void *, size_t,  void *), void *)’ {aka ‘struct asn_enc_rval_s (*)(const struct asn_TYPE_descriptor_s *, const void *, int,  enum jer_encoder_flags_e,  int (*)(const void *, long unsigned int,  void *), void *)’} from incompatible pointer type ‘asn_enc_rval_t (*)(const struct asn_TYPE_descriptor_s *, const asn_oer_constraints_t *, const void *, int (*)(const void *, size_t,  void *), void *)’ {aka ‘struct asn_enc_rval_s (*)(const struct asn_TYPE_descriptor_s *, const struct asn_oer_constraints_s *, const void *, int (*)(const void *, long unsigned int,  void *), void *)’} [-Wincompatible-pointer-types]
   56 |     OCTET_STRING_encode_oer,
      |     ^~~~~~~~~~~~~~~~~~~~~~~
asn1/src/BMPString.c:56:5: note: (near initialization for ‘asn_OP_BMPString.jer_encoder’)
asn1/src/BMPString.c:62:5: error: initialization of ‘asn_dec_rval_t (*)(const struct asn_codec_ctx_s *, const struct asn_TYPE_descriptor_s *, const asn_oer_constraints_t *, void **, const void *, size_t)’ {aka ‘struct asn_dec_rval_s (*)(const struct asn_codec_ctx_s *, const struct asn_TYPE_descriptor_s *, const struct asn_oer_constraints_s *, void **, const void *, long unsigned int)’} from incompatible pointer type ‘asn_dec_rval_t (*)(const asn_codec_ctx_t *, const struct asn_TYPE_descriptor_s *, const asn_per_constraints_t *, void **, asn_per_data_t *)’ {aka ‘struct asn_dec_rval_s (*)(const struct asn_codec_ctx_s *, const struct asn_TYPE_descriptor_s *, const struct asn_per_constraints_s *, void **, struct asn_bit_data_s *)’} [-Wincompatible-pointer-types]
   62 |     OCTET_STRING_decode_uper,
      |     ^~~~~~~~~~~~~~~~~~~~~~~~
asn1/src/BMPString.c:62:5: note: (near initialization for ‘asn_OP_BMPString.oer_decoder’)
asn1/src/BMPString.c:63:5: error: initialization of ‘asn_enc_rval_t (*)(const struct asn_TYPE_descriptor_s *, const asn_oer_constraints_t *, const void *, int (*)(const void *, size_t,  void *), void *)’ {aka ‘struct asn_enc_rval_s (*)(const struct asn_TYPE_descriptor_s *, const struct asn_oer_constraints_s *, const void *, int (*)(const void *, long unsigned int,  void *), void *)’} from incompatible pointer type ‘asn_enc_rval_t (*)(const struct asn_TYPE_descriptor_s *, const asn_per_constraints_t *, const void *, asn_per_outp_t *)’ {aka ‘struct asn_enc_rval_s (*)(const struct asn_TYPE_descriptor_s *, const struct asn_per_constraints_s *, const void *, struct asn_bit_outp_s *)’} [-Wincompatible-pointer-types]
   63 |     OCTET_STRING_encode_uper,
      |     ^~~~~~~~~~~~~~~~~~~~~~~~
asn1/src/BMPString.c:63:5: note: (near initialization for ‘asn_OP_BMPString.oer_encoder’)
asn1/src/BMPString.c:76:5: error: initialization of ‘asn_dec_rval_t (*)(const asn_codec_ctx_t *, const struct asn_TYPE_descriptor_s *, const asn_per_constraints_t *, void **, asn_per_data_t *)’ {aka ‘struct asn_dec_rval_s (*)(const struct asn_codec_ctx_s *, const struct asn_TYPE_descriptor_s *, const struct asn_per_constraints_s *, void **, struct asn_bit_data_s *)’} from incompatible pointer type ‘asn_random_fill_result_t (*)(const struct asn_TYPE_descriptor_s *, void **, const struct asn_encoding_constraints_s *, size_t)’ {aka ‘struct asn_random_fill_result_s (*)(const struct asn_TYPE_descriptor_s *, void **, const struct asn_encoding_constraints_s *, long unsigned int)’} [-Wincompatible-pointer-types]
   76 |     OCTET_STRING_random_fill,
      |     ^~~~~~~~~~~~~~~~~~~~~~~~
asn1/src/BMPString.c:76:5: note: (near initialization for ‘asn_OP_BMPString.aper_decoder’)
make: *** [Makefile:119: obj/asn1/BMPString.o] Error 1
francescoraves483 commented 2 months ago

Hi, Thank you for reporting the possible bug!

The errors you get seem to be related to code that has been generated with the asn1c tool, that we use to generate the encoding/decoding functions for the ASN.1 messages, that are later integrated into the main OScar project.

However, I have just tried compiling OScar on my two Ubuntu systems, and I get no errors. The first system is running Ubuntu 20 LTS with gcc/g++ 9.4.0, and the second Ubuntu 22 LTS with gcc/g++ 11.4.0. I also get no issue when cross-compiling for OpenWrt-V2X 21.02.1: https://github.com/francescoraves483/OpenWrt-V2X

In order to try to reproduce the issue:

Let us know! Thank you!

swthorn commented 2 months ago

I'm using GCC version 14.2.1:

Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-linux-gnu/14.2.1/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /build/gcc/src/gcc/configure --enable-languages=ada,c,c++,d,fortran,go,lto,m2,objc,obj-c++,rust --enable-bootstrap --prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=https://gitlab.archlinux.org/archlinux/packaging/packages/gcc/-/issues --with-build-config=bootstrap-lto --with-linker-hash-style=gnu --with-system-zlib --enable-__cxa_atexit --enable-cet=auto --enable-checking=release --enable-clocale=gnu --enable-default-pie --enable-default-ssp --enable-gnu-indirect-function --enable-gnu-unique-object --enable-libstdcxx-backtrace --enable-link-serialization=1 --enable-linker-build-id --enable-lto --enable-multilib --enable-plugin --enable-shared --enable-threads=posix --disable-libssp --disable-libstdcxx-pch --disable-werror
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 14.2.1 20240805 (GCC)

g++ -v outputs nearly the same thing:

❯ g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-linux-gnu/14.2.1/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /build/gcc/src/gcc/configure --enable-languages=ada,c,c++,d,fortran,go,lto,m2,objc,obj-c++,rust --enable-bootstrap --prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=https://gitlab.archlinux.org/archlinux/packaging/packages/gcc/-/issues --with-build-config=bootstrap-lto --with-linker-hash-style=gnu --with-system-zlib --enable-__cxa_atexit --enable-cet=auto --enable-checking=release --enable-clocale=gnu --enable-default-pie --enable-default-ssp --enable-gnu-indirect-function --enable-gnu-unique-object --enable-libstdcxx-backtrace --enable-link-serialization=1 --enable-linker-build-id --enable-lto --enable-multilib --enable-plugin --enable-shared --enable-threads=posix --disable-libssp --disable-libstdcxx-pch --disable-werror
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 14.2.1 20240805 (GCC)

I'm using Arch:

❯ screenfetch
                   -`
                  .o+`                 swthorn@swthorn
                 `ooo/                 OS: Arch Linux
                `+oooo:                Kernel: x86_64 Linux 6.8.4-2-pve
               `+oooooo:               Uptime: 6d 18h 40m
               -+oooooo+:              Packages: 458
             `/:-:++oooo+:             Shell: zsh 5.9
            `/++++/+++++++:            Disk: 146G / 502G (29%)
           `/++++++++++++++:           CPU: AMD EPYC 9124 16-Core @ 16x 3GHz
          `/+++ooooooooooooo/`         GPU: ASPEED Technology, Inc. ASPEED Graphics Family (rev 52)
         ./ooosssso++osssssso+`        RAM: 119741MiB / 131072MiB
        .oossssso-````/ossssss+`
       -osssssso.      :ssssssso.
      :osssssss/        osssso+++.
     /ossssssss/        +ssssooo/-
   `/ossssso+/:-        -:/+osssso+-
  `+sso+:-`                 `.-/+oso:
 `++:.                           `-/+/
 .`                                 `/

I installed a ubuntu distrobox:

distrobox create --name ubuntu --image ubuntu:22.04
sudo apt install libgps-dev gcc git make g++
git clone https://github.com/DriveX-devs/OScar.git && cd OScar
make -j8

works, so perhaps the problem is the GCC or g++ version.

francescoraves483 commented 1 month ago

Hi, Thank you very much for all the details, and sorry for the huge delay in checking out the issue!

The last commit on the main branch (7775f4c) should fix compilation under both gcc/g++ 13 and gcc/g++ 14.

Let us know in case you encounter any additional issue in compiling OScar!