c – getting warning water compiling the code and some errors

#include <stdio.h>
#include <string.h>
#include<stdlib.h>
#define  FOUND 1
#define  NOTFOUND 0

int main(void)
{

    char username(5)(10) = {"akshay", "shubham", "gaurav", "rahul", "amit"};
    int i,flag; 
    char urname(11);
    char pass(11);

    printf("enter the Username : ");

    scanf("%s", urname); 
    printf("enter the password : ");

    if (scanf("%10s", pass) != 1)
    {
        return 1;
    }
   
    flag=NOTFOUND;

     
    for (i = 0; i < 5; i++)
    {
        if (strcmp(username(i), urname) == 0) //username check
        {
             flag=FOUND;                               // username is correct
            if (strcmp("hello", pass) == 0) //password check
            {
                mainmenu();
                break;
            }
            else
            {
                printf("wrong pass");
                break;
            }
        }
    }

    if (flag == NOTFOUND) // check outside the loop
    {
        printf("wrong usernamen");
    }

    return 0;
}

mainmenu()
{
   do{

    system("cls");
    printf("*****************************************************************");
    printf("         n                       MAIN MENU                              ");
    printf(" n*****************************************************************");

    printf("n");
    printf("1. User Details:n");
    printf("2.BMI details :n");
    printf("3.calories chart");
    
    

    printf("nn");
    int ch;

    printf("enter the choice : ");
    scanf("%d", &ch);

            switch (ch)
            {
            case 1:
                BMIcalc();
                break;
            case 2:  
                Userdet();
                break; 
            case 3:
                CALchart();


            default:
                printf("invalid choice !!!");
    
           }
   } while(1);
}




  BMIcalc()
 {
      float BMI,height,weight;
              
     FILE *fp;
     struct Data
     {
         char Name(10);
         int Age;
         char Gender;
     
     } D;
       
        fp= fopen("details.txt","w+");

        if(fp==NULL)
        {
            puts("file cannot be opened");
            exit(1);
        }
      
              

               printf("nenter the height of the user (in cm) : ");
               scanf("%f",&height);
               
               printf("nenter the weight of the user (in kg) : ");
               scanf("%f",&weight);

               height=height/100;
               height=height*height;
               BMI = weight / height ;

               printf("nn Your BMI is %.2f nn",BMI);

               if(BMI<=18)
               {
                   underweight();

               }

               if(BMI>=18&& BMI<=25)
               {
                   printf("volla!!! you are in great shape...keep it up.");
               }

               
               char choice;
               printf("nn do you want to save your data (y/n) :");
               scanf("%c",&choice);
              
            
               if(choice=='y')
            {
            
            printf("n Enter the User details :");
            printf(" n Name = ");
            scanf("%s",D.Name);
            printf("n Age = ");
            scanf("%d",&D.Age);
            printf("n Gender = ");
            scanf(" %c",&D.Gender);
            fputs(" Name =",fp);   fputs(D.Name,fp);
            fprintf(fp, "n AGE = %d",D.Age);
            fprintf(fp, " n Gender = %c",D.Gender);
            fprintf(fp,"n height =",height);
            fprintf(fp,"n weight =",weight);
            
            fputs("n",fp);
        
            }

       fclose(fp); 
        

 }

   Userdet()
   {
       fflush(stdin);
       char ch;
     FILE *fp= fopen("details.txt","r");

        if(fp==NULL)
        {
            puts("file cannot be opened");
            exit(1);
        }

     while((ch =fgetc(fp))!=EOF)
     {
         printf("%c",ch);

     }  
     fclose(fp); 

   }
       

underweight(void)
{
    char ch1;
   FILE *fp1 =fopen("underweight.txt","r");
   
   if(fp1==NULL)
   {
       printf("file doesn't exists");
       exit(1);
   }

   while((ch1=fgetc(fp1)) != EOF)
   {
    
       printf("%c",ch1);
   }
   fclose(fp1);


}


CALchart(void)
{
  char ch3;
   FILE *fp3 =fopen("calorieschart.txt","r");
   
   if(fp3==NULL)
   {
       printf("file doesn't exists");
       exit(1);
   }

   while((ch3=fgetc(fp3))!=EOF)
   {
       if(ch3=='t')
       printf("t");
       printf("%c",ch3);
   }
   fclose(fp3);  
}

i am getting a warning of implicit/explicit func declaration after compiling and some bugs after in output.don’t know why the errors and warning are coming.help me to fix the code.

compiling – how to uninstall packages built from source and remove them entirely?

I have built a lib, Open3D, from source and installed it. Afterwards, i ran make uninstall for the library and deleted the entire file directory which i cloned from git, i still have existing files from Open3D from /usr/local/lib directory. This is frustrating. How do i completely remove all these files? I don’t face such problems if the package i require can be installed from apt.

This is what i get using

ncdu

--- /usr/local/lib -------------------------------------------------------------
                         /..                                                    
  661.8 MiB [##########]  libOpen3D_3rdparty_mkl_mkl_merged.a
  661.8 MiB [##########]  libOpen3D_3rdparty_faiss_mkl_merged.a
  421.2 MiB [######    ]  libOpen3D_3rdparty_embree_embree_avx.a
  411.7 MiB [######    ]  libOpen3D_3rdparty_embree_embree3.a
  394.8 MiB [#####     ]  libOpen3D_3rdparty_embree_embree_avx2.a
  311.7 MiB [####      ]  libOpen3D_3rdparty_assimp_assimp.a
   93.0 MiB [#         ]  libOpen3D_3rdparty_ippicv_ippicv.a
   48.1 MiB [          ]  libOpen3D_3rdparty_webrtc_webrtc.a
   41.3 MiB [          ]  libOpen3D_3rdparty_faiss_faiss.a
   34.6 MiB [          ]  libOpen3D_3rdparty_zeromq.a
    6.8 MiB [          ]  libOpen3D_3rdparty_imgui.a
    6.5 MiB [          ]  libOpen3D_3rdparty_tbb_tbb_static.a
    6.5 MiB [          ]  libOpen3D_3rdparty_mkl_tbb_static.a
    6.5 MiB [          ]  libOpen3D_3rdparty_faiss_tbb_static.a
    6.1 MiB [          ]  libOpen3D_3rdparty_qhullcpp.a
    4.2 MiB [          ]  libOpen3D_3rdparty_jsoncpp.a
    3.9 MiB [          ]  libOpen3D_3rdparty_jpeg.a

compiling – Is ubuntu reproducible?

How to build Ubuntu from its sources, is ubuntu reproducible?

For example, you can make and install python. What about ubuntu?

How to build a minimized shell version of the latest version of the Ubuntu operating system from its sources, Using the current installed versions of Ubuntu itself?

(Only command line interface, no GUI. To make it even lighter and easier to produce)

compiling – What’s the purpose of using Guix within Gitian? Doesn’t that reintroduce dependencies and security concerns?

There are a number of benefits that come with using Guix as a release
build environment (or just as a build system in general).

Using Gitian, you have to pick a Linux distro to build on. This
defines your toolchains, available packages, the glibc your building
against etc.

This also means you’re subject to choices of the upstream package
maintainers. They control how/when package versions are updated, what
patches are applied to them, how they are compiled etc. This has
downsides.

As an example, our security-check tests rely on a number of -no-*
options being present in mingw-w64 ld. These options were patched into
the ld in the Ubuntu Bionic binutils-mingw-w64 package, however, the
binutils maintainer chose to stop doing that in Ubuntu Focal, which
meant our security-check tests would not have been able to run (they
have since decided to re-patch them in Hirsute). See #18629 for more
details.

In Guix, because we’re in full control of our toolchains, we don’t
have to worry about issues like this, and can just directly apply the
patches we want to use, and this is exactly what we’ve done in #22381,
where we started patching the -no-* linker options into our mingw-w64
toolchain. Compiler / linker options or defaults that we may rely on,
can no-longer be randomly changing out from underneath us.

To that, some might say “well just don’t change the Ubuntu base image,
and things won’t change”. To that, I’d say, I don’t want the project
to be in a position where we are “stuck”, and can’t update our base
image to use new tools (i.e compilers), because by doing so we’ll just
break something else, like our security tests.

It would seem smarter to just remove the potential for those kinds of
problem entirely, by constructing and using exactly the release build
environment we want.

“Well why not just patch / change things in gitian” – I wont say much
on this, except for, the gitian environment is not at all setup to do
the same kind of patching that we can fairly trivially achieve in
Guix. Trying to patch and compile, for example, the mingw-w64
toolchain in a gitian descriptor, would also just turn into a terrible
mess.

The same can be said about trying to gitian build anything using a
glibc different than what is already available on that version of
Ubuntu.

This has backward-compatibility implications, as the version of glibc
you’re building against, essentially determines your runtime glibc
compatiblity. However this can be extended by using the sorts of
“workarounds” that we currently have in our glibc-back-compat code.

Now, similar to the situation where you might want to use a newer
Ubuntu release (for any number of reasons), doing so will mean that
you have to build against a newer glibc (you just get whatever version
comes with that release of Ubuntu).

This means that as you use newer versions of glibc, the number of
“workarounds” you need to maintain backwards compatibility pile up,
get continually more complicated, and even start to leak out of
Bitcoin Core code, and into our dependency system. See all the PRs
linked in this comment:
https://github.com/bitcoin/bitcoin/pull/22418#issuecomment-876379846.

Changes like that leaking into depends are bad, because now normals
builders, using depends, are now being subject to the side-effects of
patches that are only really necessary in our release build
environment. Maybe you’d argue that in that case we should only apply
the depends patches when building releases, however then you’ve got a
situation where release builds are even more divergent from
“normal”/developer builds, and this means either maintaining an even
more complex CI / testing routines, or they just end up less tested
(guess which one is more likely to happen).

If that all just sounds like a complicated mess, it’s basically
because it is. However the solution, using Guix, is actually pretty
straight forward.

When we are in complete control of our release environment, we can
pick exactly the version of glibc we want to use (even at a per-HOST
level), something that we definitely couldn’t achieve, in any sort of
straight forward fashion, if at all, using gitian.

This is something we’ve done recently, in #22365. We are now building
using glibc 2.27 for the RISC-V HOST, and using glibc 2.24 for all
others, while maintaining runtime compatibility with glibc 2.17.
You’ll note this this is achieved without needing to use any of the
work arounds from our glibc-back-compat code (#22405), or any of the
other PRs / changes mentioned in the comment above.

These are just two very practical benefits that using Guix provides
(there are more), which ultimately all boil down to us being in much
greater control of our release build environment. Something I am very
happy about, and I think makes a lot of sense for a project like
Bitcoin Core.

The fact that there are also many people in the Guix space actively
working on bootstrapability is just another big bonus, and even if
that doesn’t work exactly like some may want it too right now, it is
rapidly being improved, month on month.

Guix is also a much more likely pathway to fully bootstrapable Bitcoin
Core builds that what gitian could ever provide.

java – Program not compiling due to unknown error in code

this is the error i got when compiling this code.
it is clearly a bug in the code, but I cannot figure out what or where it is, and even if I could, I would not know how to fix it. I am using the latest version of intellij idea, although I do not think that matters. The error i got can be found here, I cannot put it here otherwise this post would be extremely long.

the code I am having problems with is in no way mine, I simply want to be able to use this code. Thanks in advanced for for any help!

compiling – need to compile. from source┬Žno configure, no readme available

I downloaded the angryIP scanner in 2.x and 2.21. The old version, because I need to run it on a Tegra (ARM) processor. The universal plattform .deb fails to install, so it seems not to be that universal… However, the archive comes with all the .h and .cpp files, but no makefile.am, makefile.im, configure, readme or whatever. I tried a couple of hours now with the auto(re)conf tools, but I fail. Any idea how I can get this compiled and installed? For dummies please…

bitcoin qt setup – QT compiling for Debian systems

Bitcoin version : 0.21
System: Ubuntu 18.04

All dependencies installed.

I am using Depends system to compile QT wallet. I compiled all three (Mac, Windows, and Ubuntu) successfully. All run just fine.

Only with Ubuntu, the QT file doesn’t open with double click like other programs. How do I compile it so it works just like other programs, and I don’t have to open terminal every time I want to run the QT wallet.

Compiling custom kernel

I am interested in compiling a custom kernel in Ubuntu 20.04 so I can use the fingerprint scanner in my hp envy x360. Also I want to learn how to learn the process. Where do I start? How difficult is it? Any pointers and/or advice would be greatly appreciated.

Compiling Bitcoin Core 0.21.1 on Apple M1 architecture

I’d like to upgrade from 0.21.0 to 0.21.1 on Mac Mini (Big Sur 11.1), compiling from source. When trying to compile the dependencies by running ‘make’ in /depends subdirectory, I get the following error:

ERROR: Feature 'system-zlib' was enabled, but the pre-condition 'libs.zlib' failed. make: *** (/Users/xxx/bitcoin/depends/work/build/arm-apple-darwin20.2.0/qt/5.9.8-82a1b93ac0c/qtbase/.stamp_configured) Error 3

Any advice on how to solve this would be appreciated!