« first day (134 days earlier)      last day (2725 days later) » 

1:10 PM
Hello everyone,
I am trying the following command:

arm-none-eabi-gcc -march=armv7-a -mcpu=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -c Demo/Drivers/rpi_gpio.c Demo/Drivers/rpi_irq.c -o build/Demo/Drivers/rpi_gpio.o build/Demo/Drivers/rpi_irq.o
But I keep getting:
arm-none-eabi-gcc: error: build/Demo/Drivers/rpi_irq.o: No such file or directory
but the directory build/Demo/Drivers does exist!
 
and if you separate the commands?
arm-none-eabi-gcc -march=armv7-a -mcpu=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -c  Demo/Drivers/rpi_irq.c -o  build/Demo/Drivers/rpi_irq.o
arm-none-eabi-gcc -march=armv7-a -mcpu=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -c Demo/Drivers/rpi_gpio.c -o build/Demo/Drivers/rpi_gpio.o
 
@trilolil what about the file
 
@ratchetfreak this does work.
 
It's clearly complaining about the missing file
 
@milleniumbug But I don't need that file. This is my output file.
hence: -o build/Demo/Drivers/rpi_irq.o
 
1:13 PM
well there you go
 
I don't want to separate the commands I have too many files...
@milleniumbug ?
I complains when I combine both commands. @ratchetfreak
 
@milleniumbug no the -o option there wasn't used correctly
 
@ratchetfreak could you please elaborate?
 
@trilolil you can just pass -c and it will map Demo/Drivers/rpi_irq.c to Demo/Drivers/rpi_irq.o automatically
 
not sure this will work:

arm-none-eabi-gcc -march=armv7-a -mcpu=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -c Demo/Drivers/rpi_gpio.c Demo/Drivers/rpi_irq.c build/Demo/Drivers/rpi_gpio.o build/Demo/Drivers/rpi_irq.o
@ratchetfreak just tried the command from above and didn't work.
 
1:19 PM
39
Q: gcc/g++ option to place all object files into separate directory

anonI am wondering why gcc/g++ doesn't have an option to place the generated object files into a specified directory. For example: mkdir builddir mkdir builddir/objdir cd srcdir gcc -c file1.c file2.c file3.c **--outdir=**../builddir/objdir I know that it's possible to achive this with separate ...

 
@trilolil The result of the compilation result is one object file. -o accepts one path
@trilolil That's different, no sane people repeat command for every file, they use build engines
 
@milleniumbug hmm... Any tips about what I could do?
 
option 1: use a build system to do this for you
option 2: create a little script to do it for you
option 3: just live with the .o files in the source dir and set other tools to ignore them
 
@ratchetfreak isn't that called a makefile?
 
1:25 PM
make is one of the build systems, makefile is the format it accepts
 
there are several options for build systems, makefile is one of them
 
there are others like scons, cmake, premake, ninja, ...
 
there is a fourth option: use a single translation unit.
 
not really an option actually :D
 
aka make a single cpp file that includes all other cpp files and compile just that
there are several caveats with that but if you don't mind them ...
 
1:36 PM
Could someone help me to understand this Makefile
When is build/%.o "executed"?
 
I believe when any of the %.c is changed
 
And it compiles the source files to object files, right? @ratchetfreak
Because this does exactly what I need!
But I am unable to reproduce it.
 
well also when one of the things that use any of the build/%.o is requested
 
1. make all
2. goes to all: $(MOD_NAME)
3. goes to $(MOD_NAME): $(OBJECTS), where it modifies the extensions of the files, without even compiling it?? o.O
4. compiles
step 3 doesn't make much sense to me.
@ratchetfreak
 
look where $(OBJECTS) is defined
it is a copy of the sources but with the extension replaced and in another directory
so $(MOD_NAME): $(OBJECTS) requires up to date object files, which each depend on the corresponding source file
(disclaimer: I'm not all that well versed in makefiles, I prefer to write simple explicit build scripts that just compile from scratch every time)
 
 
1 hour later…
2:58 PM
@ratchetfreak Why would you do this? I mean you need to compile the source file to obtain an object file. Just replacing the extention won't turn it into an object file.
 
correction: it is a copy of the list of sources but with the extension replaced and in another directory
 
@trilolil oh look it's running asdasdasd NAME_OF_SOMETHING.c -o NAME_OF_SOMETHING.o, I wonder how can I deduce how to name the object files
 
@ratchetfreak why?
 
because that's how you want to object files to be named
 
@ratchetfreak you need to compile the source file to obtain an object file. Just replacing the extention won't turn it into an object file. You can specify the name at compile time instead of first copying everything (what seems useless to me).
 
3:05 PM
$(patsubst %.c,build/%.o,$(SOURCES)) will create a list by going over each element in $(SOURCES) and replace the extension with oand prepend build/to the path.
that is just a list of file names
the build/%.o: %.c rule will describe how to create them
 
Oh ok yes, so it is not physically copied. I see now.
@ratchetfreak last question. I don't see why this is needed.
 
because not needing to compile all the files is better than requiring it
 
though a clean build does have a few advantages
I've been bitten a few times by something being out of date when it shouldn't have been
 
that rather means: the build engine is shit at tracking dependencies
never happened to me with cmake
 
@ratchetfreak is that an answer to my question?
 
3:10 PM
no
 
k
 
3:59 PM
hi everyone, I am not sure this is fit for SO, so I will ask here first, I am trying to compile openssl 1.1.0c, and I get the following errors pastebin.com/2DZNC6E5 using nmake, been stuck at it for hours search to no avail, would love if anyone could light up my dark tunnel...
 
1 message moved from Lounge<C++>
 
if u need additional information let me know, or if u think there is SE I could post it at...
 
@Guapo and what is on (and around) line 143 in crypto\ct\ct_log.c
 
I looked at the file it seems right, line 143 is:
fpath = CTLOG_FILE;
the whole block is:
int CTLOG_STORE_load_default_file(CTLOG_STORE *store)
{
    const char *fpath = getenv(CTLOG_FILE_EVP);

    if (fpath == NULL)
      fpath = CTLOG_FILE;

    return CTLOG_STORE_load_file(store, fpath);
}
 
is CTLOG_FILE defined to be anything?
 
4:06 PM
in some file it seems as it is a instance of something, let me try to find it
 
Unless you're really intent on doing this on your own, I'd build it in two steps. 1) install vcpkg 2) type "vcpkg install openssl".
 
from the error messages I believe it's #defined as a path file without surrounding quotes
 
its defined there
@ratchetfreak CTLOG_FILE OPENSSLDIR "/ct_log_list.cnf"
@JerryCoffin all I wanted was the damn curl libs with ssl support ;(
 
@Guapo So type "vcpkg install curl" instead.
 
I can compile curl fine WINSSL but since i can't compile openssl right now I can't compile it with openssl instead
 
4:11 PM
and then the rabbit hole deepens, then it's finding what OPENSSLDIR is defined as
 
well I don't have 2015 and even if I did I need compatibility with v90
@ratchetfreak assuming its using the configuration file it should be "C:\OpenSSL-Win32"
 
@Guapo vc90? You have my sincere condolences.
 
yeah the github.com/openssl/openssl/blob/master/Configurations/… puts it in the compiler flags
"-DOPENSSLDIR=\"$openssldir\""
 
@JerryCoffin :'( please don't tell me about... I am already crying by the grave
 
@Guapo Thinking a little more, however, this may not be a major problem. If memory serves, OpenSSL builds as a DLL, and its interface is entirely C. Assuming that's the case, building it with VC 2015 and using it with VC 9 should work fine. To build with 2015, you can use the (free) 2015 Community Edition.
 
4:19 PM
@ratchetfreak im a bit lost, you want me to add it to the nmake or edit the file generated from the configure directly or neither and im just stupid :P
 
@Guapo no I was just quoting how the define is added to the compiler flags
 
@ratchetfreak is there much of a difference compiling curl with openssl against winssl? as in overall usage?
I mean, if u know ofc
 
no idea
 
@Guapo I've used cURL both ways. I don't remember any massive differences (but I didn't benchmark them or anything like that--just used cURL and it seemed to work either way).
 
@JerryCoffin thanks I honestly don't know if there is anything that could be affect by it for a https communication, which is why I was trying to get openssl, but with WINSSL I can compile curl right off the bat
@ratchetfreak I think I found the issue thanks to you pointing those information, so far it went past the error.
 
4:33 PM
@Guapo I don't recall any noticeable difference, though I never looked very carefully for differences. In both cases, I could get stuff over encrypted connections; I never noticed a difference in setup time, bandwidth, etc., but there could have been one that I just didn't notice.
 
well I am just setting it up for learning purpose at this moment, so speed, bw, etc are not a really big concern
but really appreciate your output, thx
and @ratchetfreak thanks again it all compiled right now, it was a dang space that I spotted when looking at the template file
well not all :P but openssl, hopefully curl will as well
 
@Guapo If you've already built it with WinSSL, re-building with OpenSSL (now that you have OpenSSL itself built) should be pretty easy unless things have changed since the last time I did it.
 
@JerryCoffin I guess im pretty luck at finding issues :P fatal error LNK1181: cannot open input file 'libeay32.lib'
I believe that should have been compiled from openssl but apparently it didn't, maybe that is linux related and windows uses crypto? so I need to add some switch to curl to use crypto instead?
not sure yet still researching
 
4:50 PM
@Guapo That should have been built when you built openssl, IIRC. It's probably just a matter of adding the right directory to your "LIB" environment variable so the linker can find it.
 
that's the thing I have libssl.lib and crypto.lib no libeay32.lib
that's on the lib folder, on the bin one I have libcrypto.dll and libssl.dll and openssl.exe
 
@trilolil why not. The idea is to tell Make "I'd like to have these files" and Make finds a rule that could possibly produce those files (i.e. where the target has a matching pattern)
@trilolil The word is patsubst: "pattern-substitute" - not filecp or something :) Also, I linked you to it right when you asked 2 days ago:
2 days ago, by sehe
@trilolil patsubst is the stuff I look up here https://www.gnu.org/software/make/manual/html_node/Text-Functions.html
Sadly you removed the question. (It was ~"what is patsubst?")
 
5:20 PM
eh I give up for now, no idea how to get that libeay out of it, and my brain just burned out
 
5:45 PM
OK, so libeay has been renamed on 1.1.x for windows and has been libssl and libcrypto on unix for a long time mmm
so I guess I need to rename the build files (hopefully only those) on curl to have it working
 

« first day (134 days earlier)      last day (2725 days later) »