[oi-dev] strange compiler error

Friedrich Kink friedrich.kink at fkink.de
Fri Nov 4 20:13:46 UTC 2022


Hi all,

I try to compile the newest asterisk version, but I get the following 
linker error:

/usr/gcc/7/bin/gcc -g -nostartfiles -nodefaultlibs -nostdlib -r -Wl,-b 
binary -o res_geolocation/pidf_lo_test.o res_geolocation/pidf_lo_test.xml
ld: fatal: file binary: open failed: No such file or directory

/usr/gcc/7/bin/gcc -g -nostartfiles -nodefaultlibs -nostdlib -r 
-Wl,--format=binary -o res_geolocation/pidf_lo_test.o 
res_geolocation/pidf_lo_test.xml
ld: fatal: unrecognized option '--format=binary'
ld: fatal: use the -z help option for usage information

according to the man page (man ld) both variants are allowed, so I'd 
assume that it works (s. below)

..


        -b input-format
        --format=input-format
            ld may be configured to support more than one kind of object 
file.
            If your ld is configured this way, you can use the -b option to
            specify the binary format for input object files that follow 
this
            option on the command line.  Even when ld is configured to 
support
            alternative object formats, you don't usually need to 
specify this,
            as ld should be configured to expect as a default input 
format the
            most usual format on each machine.  input-format is a text 
string,
            the name of a particular format supported by the BFD libraries.
            (You can list the available binary formats with objdump -i.)

            You may want to use this option if you are linking files with an
            unusual binary format.  You can also use -b to switch formats
            explicitly (when linking object files of different formats), by
            including -b input-format before each group of object files in a
            particular format.

            The default format is taken from the environment variable
            "GNUTARGET".

            You can also define the input format from a script, using the
            command "TARGET";

Any idea what else could be wrong?

kind regards,

   Fritz




More information about the oi-dev mailing list