Installation of gcc-toolchain did not help.
$ guix package -I |grep gcc
gcc-toolchain 8.2.0 out
/gnu/store/xwk99qi92pm3zqd95mvjx4mkdmg8plpk-gcc-toolchain-8.2.0
$ gcc c
c: file not recognized: file format not recognized
collect2: error: ld returned 1 exit status
$ cat c
#include <sys/stat.h>
#include <stdio.h>
int main(void)
{
struct stat stats;
if (!stat("/", &stats))
{
printf("%u\n", stats.st_blksize);
}
}
Feb 9, 2019, 2:35 PM by [email protected] <mailto:[email protected]>:
>
> [email protected] <mailto:[email protected]>> writes:
>
>> Hi! I compile this >>
>> https://stackoverflow.com/questions/6161823/dd-how-to-calculate-optimal-blocksize
>>
>> <https://stackoverflow.com/questions/6161823/dd-how-to-calculate-optimal-blocksize>>>
>> <>>
>> https://stackoverflow.com/questions/6161823/dd-how-to-calculate-optimal-blocksize
>>
>> <https://stackoverflow.com/questions/6161823/dd-how-to-calculate-optimal-blocksize>>>
>> >
>>
>> and get this:
>>
>> $ gcc c.c
>> collect2: fatal error: cannot find 'ld'
>> compilation terminated.
>>
>> $ whereis ld
>> ld:
>>
>> $ gcc --version
>> gcc (GCC) 8.2.0
>>
>> How to solve this?
>>
>
> I’m assuming that you installed the “gcc” package. Don’t do that.
> Install “gcc-toolchain” instead.
>
> guix package -r gcc -i gcc-toolchain
>
> --
> Ricardo
>